Re: [csswg-drafts] [css-anchor-position-1] Working with Scroll Driven Animations (#9379)

Anchor positioning determines the position, which should affect a scroll driven animation on the anchoring element (see blue anchor in demo). A scroll driven animation could be made to affect the position of the anchor (green anchor in demo). These both behave as expected in chrome. I put together a [demo](https://jsbin.com/menefik/edit?html,css,js,output) of both of these cases.

I suppose a particular degenerate case would be if the anchoring element defines a timeline based on its position that is used by a scroll driven animation, [example case](https://jsbin.com/jisugub/edit?html,css,js,output) shows this. The anchored element defines a timeline which is used to move the anchor target to which it is anchoring which in turn affects the anchor position. This also seems to work fine in chrome since scroll timelines are only sampled once per frame - though admittedly the sampled position of an anchor position element would be before the current update.

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


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

Received on Wednesday, 20 March 2024 13:46:39 UTC