- From: Bramus via GitHub <noreply@w3.org>
- Date: Wed, 17 Dec 2025 11:09:22 +0000
- To: public-css-archive@w3.org
> […] This creates a `::view-transition-group(-ua-scoped-root)` and `::view-transition-group-children(-ua-scoped-root)` with the latter hosting the descendant participating elements. There are no styling implications (i.e. the authors can style this as usual) This goes against the current resolution in which we disallow authors to target `-ua-*`-prefixed pseudos. Yes, we could tell authors to use `view-transition-class` in this case, but that goes against the purpose of VT classes. Yes, we could allow targeting `-ua-scoped-root` in this case, but that’s an exception to the existing rule. Taking a step back, I feel that in this approach we are piling a few exceptions onto each other, just to make it work: - We create (some) pseudos for the scope root, even though it has no `view-transition-name` - We allow `view-transition-group: contain` to have an effect on (all?) elements with no `view-transition-name` - We allow targeting the pseudos with the `-ua-*` prefix To me this feels sketchy, and it also makes it hard to explain to authors. VTs are already hard to understand for authors, and adding exceptions ain’t really helping. --- I would rather see us _not_ carve out exceptions, and instead pursue a cohesive solution in which the pieces of the puzzle nicely fit together. I still believe that force capturing the scope root (by using a `view-transition-name: root !important` in the UA stylesheet) + giving authors a way to control what to capture (the full shebang, or only the dimensions) provide a way out here. (For clarity: in this model, when only capturing the dimensions, this would result in no `::view-transition-image-pair()` or any of its children being created). This keeps things predictable for authors, without requiring them to remember exceptions: - Only elements with a `view-transition-name` are part of a View Transition, just like they already learned. - `view-transition-group: contain` _(as does `view-transition-group: nearest` or `view-transition-group: <ident>` on children)_ work without any change. - Targeting `-ua-*`-prefixed pseudos from an author stylesheet is still disallowed. As for the “what to capture” control part: in https://github.com/w3c/csswg-drafts/issues/12324#issuecomment-3636012365 I proposed some options for this. This could be a CSS property or a JS opt-in. I think we should use the CSS opt-in, as this also has its use outside of Scoped View Transitions + also aligns with earlier expressed request such as https://github.com/w3c/csswg-drafts/issues/9406 _(Optimize no content change animations)_. though, to move things forward here, we could go for a JS opt-in on `Element.startViewTransition` for now, and then eventually have that be backed up by CSS properties. The outcome of this approach is exactly the same as the other approach, but with the added benefit of everything that happens during the capture being backed not by exceptions but by actual instructions (in CSS or JS) that authors can inspect and learn from: - The scope root gets captured because it has a forced `view-transition-name` in the UA Style Sheet, not because of an exception - The pseudos get a name derived from the given `view-transition-name` (and thus authors can target it to add things like `overflow: clip` on the `v-t-g-c` pseudo like they normally do) - The scope root only gets its dimensions captured because the author opted in to do so. Note that this does not make Scoped Transitions dependent on https://github.com/w3c/csswg-drafts/issues/11596 _(The ability for authors to re-enable pointer events)_ at all, because authors can – like they already do today – set `pointer-events: none` on the `::view-transition` overlay. -- GitHub Notification of comment by bramus Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/12324#issuecomment-3664856465 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Wednesday, 17 December 2025 11:09:22 UTC