Overview of CSS Image Animation
mainprefers-reduced-motion for specific decorative or UI images.repository·main·Indexed 26 days ago
https://github.com/w3c/csswg-draftsA repository containing CSS Working Group draft specifications and utility tools. It includes documentation for CSS properties like overscroll-behavior, specifications for CSS Scrollbars and CSS Table Module Level 3, and various build scripts for generating SVG color diagrams (Oklab, Jzazbz), converting Markdown to HTML, and managing specification indices.
prefers-reduced-motion for specific decorative or UI images.column-rule properties to other layout models, providing a more ergonomic way to handle separators and dividers without manual workarounds.AnimationTimeline implementations: ScrollTimeline and ViewTimeline. These APIs work with existing Web Animations and CSS Animations, enabling smoother, more performant animations that can often run off the main thread.env(preferred-text-scale) CSS environment variable provides authors with access to the user's system font scale factor. This allows developers to adjust website layouts to accommodate increased text sizes without forcing a full page zoom (which scales all elements, including non-text elements) or breaking existing layouts. This is particularly useful for mobile web content and content rendered within app Web Views where standard browser zoom controls may be unavailable.When spatial navigation is active, pressing an arrow key moves focus to the best target in that direction or scrolls the container if no target is found.
The search process:
Focus Containers:
By default, the root element, scrollable elements, and iframes act as containers. You can define custom containers using the spatial-navigation-contain CSS property.
Scroll-driven animations use timelines to control the progress of an animation based on scroll position rather than time. The specification introduces two primary types of timelines:
ScrollTimeline: Used to link animation progress to the scroll progress of a specific scroller.ViewTimeline: Used to link animation progress to an element's visibility/progress as it passes through a scrollport (e.g., for reveal effects).These timelines integrate with the Web Animations API and can be used in conjunction with the Houdini Animation Worklet for complex, off-thread animations.
The primary objectives for the CSS Gap Decorations specification are:
The CSS Working Group is evaluating several different syntax proposals for CSS Nesting. These proposals differ primarily in how they handle the nesting context, the requirement of the & (nesting selector), and how they distinguish between property declarations and nested style rules.
Key proposal categories include:
& prefix or an @nest rule. If using a selector list, every selector must start with &.& div or :is(div)). This avoids ambiguity with properties without requiring a formal parser switch.@nest rule, a special ASCII selector (like &&), or bare braces.@nest rule that contains a block of nested rules. This separates properties from rules and avoids the need for & in most nested selectors.The w3c/w3c/csswg-drafts repository contains the official editor's drafts for CSS specifications.
To read the specifications, use the official index: https://drafts.csswg.org/index.html
Element-scoped view transitions allow developers to isolate view transitions to a specific subtree rather than the entire document. This solves issues where global document-level transitions interfere with the z-index order of overlaid elements (like tooltips or menus) that are not part of the transition.
By using an element as a scope, the ::view-transition pseudo-element tree is painted on top of the scope regardless of the z-index of other elements in the document, providing better modularity and composition.