[csswg-drafts] [css-view-transitions-1] Using pseudo-elements vs shadow DOM (#7928)

khushalsagar has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-view-transitions-1] Using pseudo-elements vs shadow DOM ==
[ViewTransitions](https://drafts.csswg.org/css-view-transitions-1/) involve the UA generating a DOM tree. A design question which has come up on #7743 and #7788 is whether this DOM tree is backed by pseudo-elements, shadow DOM or the API leaves that as an implementation detail. Filing an issue to resolve on that separately to unblock the syntax/naming discussion.

The [TPAC discussion](https://github.com/w3c/csswg-drafts/issues/7743#issuecomment-1248794015) on this had the following AIs:

- _ACTION: JakeA and khush to draw up pros and cons for shadow DOM vs pseudo-elements vs mixed approaches_ : The doc is [here](https://docs.google.com/document/d/1kW4maYe-Zqi8MIkuzvXraIkfx3XF-9hkKDXYWoxzQFA/edit?pli=1).
- _ACTION: JakeA and khush to sketch out scoped transitions to see how they work_: The doc is [here](https://github.com/WICG/shared-element-transitions/blob/main/scoped-transitions.md).

The TLDR summary is here:

- While the html element can't have a developer provided shadow DOM, other elements can. This complicates using shadow DOM with [scoped transitions](https://github.com/WICG/shared-element-transitions/blob/main/scoped-transitions.md) where the generated tree can be hosted by any DOM element. This includes elements which have an existing developer or UA shadow DOM.

- Between using pseudo-elements and multiple shadow DOMs on an element, pseudo-elements seem easier to implement. But if multiple shadow DOMs on an element are easier to implement for an engine, we can structure the API to leave that as an implementation detail.

**Proposed Resolution**: Use pseudo-elements for UA generated DOM in ViewTransitions.

/cc @astearns @chrishtr @emilio @fantasai @jakearchibald @tabatkins @vmpstr FYI from the TPAC discussion. Apologies if I missed anyone.

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/7928 using your GitHub account


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

Received on Thursday, 20 October 2022 15:36:43 UTC