- From: vmpstr via GitHub <noreply@w3.org>
- Date: Fri, 20 Feb 2026 15:53:30 +0000
- To: public-css-archive@w3.org
`::view-transition` uses the snapshot containing block which is not affected by the document scroll, so having us move the view transition pseudo in response to the scroll would change that semantic. Conceptually the document view transition happens "above" the document, so everything is re-targeted in response to the scroll instead of adjusting immediately. I can definitely see the argument for keeping this "internal" to the scroller, but to explain my position consider the following case where the scroller is not the root scroller (https://vt-retarget-vmpstr.yoyo.codes/): https://github.com/user-attachments/assets/b7445eb5-1939-46f4-8530-34fae285f1d4 Here, when the ball remains within the scroller it still retargets, but it should be clear it's because the transition is running outside of the scroller. Is this the intended effect? I don't know, maybe the participating element should be moving within the scroller responding instantly. Although escaping the clip would be weird in that case. But I hope we can agree, when the ball toggles between being inside and outside, retargeting seems to be the right behavior. My contentious claim is that the root scroller is no different here, since the transition is happening outside of it and could, for example, be transitioning from/to the top layer (which iirc isn't affected by root scroll?). I'm sympathetic that there should be some solution to this. I think the element scoped view transitions provides a sufficiently granular tool in that it allows the transition to happen on some subtree, with the `::view-transition` pseudo hanging off that subtree's root, meaning any ancestor scrolls (like document scrolls) would instantaneously take effect. While we work on that, I think we may want to be stick with the css/script math that @bramus has. -- GitHub Notification of comment by vmpstr Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/10197#issuecomment-3935713526 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Friday, 20 February 2026 15:53:31 UTC