[csswg-drafts] [cssom] getDiscreteStyle and getDiscreteRect for Relative Animation (#10681)

KevinDoughty has just created a new issue for https://github.com/w3c/csswg-drafts:

== [cssom] getDiscreteStyle and getDiscreteRect for Relative Animation ==
Animation-only restyles are not needed to interrupt and retarget animations. getComputedStyle and getBoundingClientRect unneccesarily include animated values, which breaks Relative Animation. getDiscreteStyle and getDiscreteRect would be extremely easy to implement in browsers. Perhaps there is a need for a discrete version of getClientRects but I haven't investigated.

Relative conversion of values is old minus new to zero. Old means the previous, non-animated value, new is the destination value, and zero depends on the type, e.g. the identity matrix. Animations are additive (or accumulate for lists) using easing to blend them together. A fraction of this pattern was popularized on the web as FLIP, except Relative Animation works for all properties not just transforms, requires fewer style recalculations, and gives nicer behavior. For transitions it would work for an arbitrary number of states, not just limited to two like CSSTransitions Level One section 3.1 Faster Reversal, and give nicer behavior.

Related proposal:
https://github.com/w3c/csswg-drafts/issues/10646

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/10681 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Saturday, 3 August 2024 11:39:54 UTC