- From: François REMY via GitHub <sysbot+gh@w3.org>
- Date: Tue, 13 Feb 2024 17:55:16 +0000
- To: public-css-archive@w3.org
FremyCompany has just created a new issue for https://github.com/w3c/csswg-drafts: == [css-anchor-position-1] Should animations use View Transitions as their backing mechanism? (by default or as an opt-in) == At [today's presentation](https://lists.w3.org/Archives/Public/www-archive/2024Feb/0002.html) (F2F Mountain View 2024), Tab proposed some "magical" computed-time animation for the anchored-element when its position or size would otherwise change as a result of anchoring updates. As far as I understand, this would be implemented as an internal `position-coordinates` property which would be the bounding box of the element, would be set by the anchor positioning choices, and would be animatable. One issue with this is that this animation requires layout at every step of the animation, and there is no guarantee that the intermediate layouts are even valid. For example, if your popup switches from a "top center" tooltip (above the anchor, sized as a wide but not tall box) to a "left center" tooltip (on the left of the anchor, sized as a tall but not wide box), then you can end up with an intermediate "mid-wide, mid-tall" box that does not fit its content, so it overflows, and authors have little to no control over this. An alternative design would be to instead trigger scoped view transitions. Doing this would take a screenshot of the initial state (or multiple small screenshots if there are multiple parts in the animation) and each part is then transitioned using the view-transition pipeline, which has various affordances to deal with these details. This also allows to animate different parts in different ways, especially if the content of a wide popup and a tall popup is different (some elements might move, appear, disappear, etc...). I would posit that this is easier to implement than the `position-coordinates` animation magic, and is more efficient.... pending the view-transition animations are already implemented (which is not yet the case in all browser). Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/9945 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Tuesday, 13 February 2024 17:55:19 UTC