ScrollTimeline and ViewTimeline are an extension to the Web Animations spec which allow developers to use the position of a scroller or the position of an element within a scroller as an input 'time' rather than the default monotonic clock time. This enables fast scroll-based animations, such as a shrinking navigation bar, without requiring user script execution. They can be declared and instantiated both via CSS and Javascript used in CSS animations and Web Animations.
# animation-duration A notable change was made to the animation-duration property. In particular the animation-duration now supports 'auto' values and the initial value of animation-duration is changed to 'auto'[1] which aligns a CSS animation's default duration with one constructed via the web animations API[2], and allows the default duration to be automatically computed for scroll driven animations as well as the upcoming group and sequence effects. Visually this is identical for existing animations because an "auto" duration on a plain document timeline results in an intrinsic iteration duration[3] of 0. However, the "auto" value will now be visible in the developer observed style so code which may have parsed the time value expecting a 0 could now break. E.g. parseFloat(getComputedStyle(elem).animationDuration) results in NaN for "auto" duration compared to 0. On Canary the computed duration for 0-duration animations is accessed on 0.05% of page loads. As a baseline, computed webkit-font-smoothing property (i.e. a property often not intentionally accessed) is accessed on 0.02% of page loads for the same set. [1] https://drafts.csswg.org/css-animations-2/#animation-duration [2] https://drafts.csswg.org/web-animations-1/#the-effecttiming-dictionaries [3] https://drafts.csswg.org/web-animations-2/#intrinsic-iteration-duration
Scroll driven animations can be built as a progressive enhancement to an otherwise static scrolling page. It is also possible to polyfill the API - see https://github.com/flackr/scroll-timeline/ for a wpt-tested polyfill that is slightly out of date.
No known risks.
Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?
None
The current tooling provided by DevTools supports showing/editing of the used keyframes and the newly introduced CSS properties. There is active work being done to improve dedicated tooling over time.
Shipping on desktop | 115 |
Shipping on Android | 115 |
Shipping on WebView | 115 |
Open questions about a feature may be a source of future web compat or interop issues. Please list open issues (e.g. links to known github issues in the project for the feature specification) whose resolution may introduce web compat/interop risk (e.g., changing to naming or structure of the API in a non-backward-compatible way).
There a few issues still being resolved:--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAJh39TOwKQLH_By5y5GQGiHPmkfnu2COC_geD1JA8E13kj8N7A%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAA44PQjZaQf9iLaqY-T-riD9QbOXHrTT2MG0aGOB%3DQk9MBMVDw%40mail.gmail.com.
LGTM3
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAL5BFfUS%3DeWpx4wmiv%3DE%2Bu-6y1pjSAk-yYxtf9B6TxDPDGLCqQ%40mail.gmail.com.