[csswg-drafts] [css-anchor-1] Transitioning when the anchor element with a given name changes (#8181)

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

== [css-anchor-1] Transitioning when the anchor element with a given name changes ==
It's pretty obvious that if an element changes from `top: anchor(--foo top);` to `top: anchor(--foo bottom)`, that's a computed-value change that will trigger a transition on 'top'.

But what happens when the value is `top: anchor(--foo top);` the whole time, but you change which element has `anchor-name: --foo;`? @jh3y has an example of this using the popover API, where they change the popover attribute, altering which element is used as the "implicit anchor element" without actually touching the CSS. They'd like the abspos to smoothly transition to its new position.

I think this gets solved appropriately with the exact same solution as #8180 - if the tree-scoped reference is resolved as part of the computed value, then having it change underneath you counts as a computed-value change, thus triggering a transition, *and* the start and end values are (non-textually) distinct, referring to the old and new anchor, so you can meaningfully transition between them.

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


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

Received on Friday, 2 December 2022 21:56:15 UTC