[csswg-drafts] [css-view-transitions-2] Clarify ordering of `::view-transition` with other tree-abiding pseudo-elements (#9588)

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

== [css-view-transitions-2] Clarify ordering of `::view-transition` with other tree-abiding pseudo-elements ==
CSS Pseudo spec defines [tree-abiding pseudo-elements](https://www.w3.org/TR/css-pseudo-4/#treelike) which are pseudo-elements that fit in the box tree like DOM elements. All of the view-transition pseudo-elements are also tree-abiding pseudo-elements. While the View Transition spec has a well defined structure (and DOM order) of the internal pseudo-elements, we need to explicitly define the DOM order of `::view-transition` with respect to other pseudo-elements.

**Proposed Resolution**: `::view-transition` is the last child of its originating element, i.e., following `::after`.

I don't think the above matters during layout/paint. `::view-transition` has its own special containing block and a stacking context (which paints last). Style could've been affected by it if selectors like `nth-child` applied but they don't apply to pseudo-elements. So my rationale for the above resolution is that it being last conceptually fits the fact that its painted last.

Side-note: The DOM order for existing tree-abiding pseudo-elements should probably be spec'd in css-pseudo. I only found it in the animation spec [here](https://drafts.csswg.org/css-animations-2/#animation-composite-order:~:text=With%20regard%20to%20pseudo%2Delements%2C%20the%20sort%20order%20is%20as%20follows). But we should ideally define it in the pseudo spec which is referenced by the animation spec.

@flackr @bokand FYI. @fantasai @astearns because this touches the pseudo spec.

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


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

Received on Thursday, 9 November 2023 23:57:19 UTC