Re: [csswg-drafts] [css-anchor-position-1] Behavior with transforms and offset-path (#8584)

> When an anchor is resized or moved, that should obviously affect any anchored elements, so any such bounding box that we calculated at the previous anchor recalculation point needs to be updated somehow. But transforms may have changed in the meantime as well. What to do?

Ah, took me a sec to realize what the question was here. We track layout changes "live", but only track scroll offset changes at the specific recalculation points, and the question is whether transform changes should act like layout or like scroll.

I agree it would be weird if both the layout and transform changes, but we don't update the transform adjustment, because the anchor would be off in a weird way. 

But what if *only* the transform updates? That is meant to be hardware-accelerateable, like scrolling, so tracking it live would cause the same issues as tracking scrolling - it might be a frame or two late, which looks really bad when the positioned element is trying to "stick" to the anchor.

I'm not sure what the right answer is here. :/

-- 
GitHub Notification of comment by tabatkins
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/8584#issuecomment-3103830608 using your GitHub account


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

Received on Tuesday, 22 July 2025 16:47:43 UTC