Re: [csswg-drafts] [css-view-transitions-1] Named elements appear above fixed elements when transitioning (#8941)

### Use case: Animation of old page, not new one

I have [this use case](https://stackoverflow.com/q/79770924/9655481) for a View Transition where I'd like to add an animation to the old page, not the new one. At the end of that animation, the old page is fully out of view such that the new page is entirely visible.

Is that somehow possible? Since due to the paint order, the new element will directly be rendered in front of my old content, making it impossible to see the animation of the old page.

> The fix is simple, you can use z-index to define the paint order of the group pseudos:

This lets me think I can give a `view-transiton-name: body-old` and `view-transition-name: body-new` CSS style to the body of the old and new page respectively, to then be able to set the `z-index` in the `::view-transition-old(root)` and `::view-transition-new(root)`. However, this doesn't seem to work as the new content is still painted over the old one.

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


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

Received on Monday, 22 September 2025 16:59:31 UTC