Re: [csswg-drafts] [css-view-transitions-2] Relationship of scoped & nested view transitions, an alternate approach? (#11927)

> Ah, I think I get it now: the nested contents get rendered into a pseudo-tree which gets placed on the original element.

Exactly

> But that would only work when authors `display: none` the `::view-transition-old(my-list)`, right?

This is also an issue with scoped view transitions...
It can happen automatically when people opt-in to this behavior.

I think that if we introduce a property like `view-transition-scope` for scoped/nested view transitions it could have 3 values:

* `view-transition-scope: none`
The current behavior, the element doesn't create a new scope, descendants are scoped to the document or nearest scope.

* `view-transition-scope: isolated`
Names inside the group are not captured. The element is captured as a flat element. The author can start a separate view transition on the scoped element.

* `view-transition-scope: nested`
Names inside the group are captured. When rendering, the element creates its own pseudo-element tree and the output is rendered together with the element into the `::view-transition-new` pseudo-element. This element itself doesn't capture its old state.






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


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

Received on Friday, 21 March 2025 16:59:36 UTC