[csswg-drafts] [css-shared-element-transitions-1] should animations retarget to new positions smoothly (#7813)

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

== [css-shared-element-transitions-1] should animations retarget to new positions smoothly ==
In [shared element transitions](https://drafts.csswg.org/css-shared-element-transitions-1/) we use CSS animations to change the position and size of the pseudo elements from the "old" values to the "new" values, where new values are taken from the represented element (perhaps once a frame, depending on #7812). 

If the represented element changes position abruptly, this will cause the interpolated position of the pseudo element (that's mid-animation) to also change its position abruptly. 

Now, since these are UA generated animations, we have an opportunity to "smoothly retarget" to the new position by stacking several animations with a "to" keyframe and an implicit "from" keyframe, which would do a c-inf continuity on the path of the pseudo element.

That's adding a bunch of complexity but provides a nice polish for a page that tends to move the target element around with something like a layout shift: the animations would by default be always smooth

Should we do this?

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


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

Received on Friday, 30 September 2022 03:46:04 UTC