Re: [csswg-drafts] [css-view-transitions-1] Clarify implications of scrolling during a transition (#10197)

Digging this back up after I noticed that Firefox (currently) doesn’t account for the adjusted scroll offset (https://bugzilla.mozilla.org/show_bug.cgi?id=1991967) during a View Transition.

(This was most likely overlooked, because the details in this issue have not made it into the spec yet 😬)

I read in this issue here that:

> the `-ua-view-transition-group-anim-transitionName` 'from' keyframe includes the initial scroll position, and the (implicit) 'to' keyframe includes the current scroll position (and changes each frame if scrolling happens).

To me this seems like a lot of work, especially when you have a lot of groups.

Wouldn’t it be more performant if the entire `::view-transition` pseudo moved as a whole, instead of updating all end positions of each and every `::view-transition-group()`?

This approach is exactly what I do for the Firefox workaround in https://codepen.io/bramus/pen/KwVMMdr/510ccfa2f1599ac75233d78eb0376333: while a View Transition is running I track the scroll delta and update the `::view-transition`’s position accordingly.

```css
::view-transition {
  translate: calc(var(--vt-scroll-delta-x, 0) * 1px) calc(var(--vt-scroll-delta-y, 0) * 1px);
}
```

I believe this would also play nice with https://github.com/w3c/csswg-drafts/issues/12324, in which there is discussion about how to position the `::view-transition` pseudo for scoped transitions, maybe using anchor positioning.

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


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

Received on Friday, 10 October 2025 08:22:41 UTC