Re: [csswg-drafts] [css-view-transitions-1] Prose to modify pseudo-trees (#8113)

I was rooting for option 1 because there are other spec concepts which lean on the term "node" and the concept of a node tree that the pseudo-element tree needs to integrate with. [Flat tree](https://w3c.github.io/csswg-drafts/css-scoping-1/#flat-tree) is one of those. Uses of it assume that this includes pseudo-elements. For instance, the contain spec [here](https://w3c.github.io/csswg-drafts/css-contain/#contain-property:~:text=the%20flat%20tree%20descendants%20of%20the%20element).

I'm not sure if the term node in flat tree intends to reference the [node concept](https://dom.spec.whatwg.org/#concept-node). It would be a problem if it does because pseudo-elements don't strictly support that definition (the Node idl is not exposed).

So if we go with option 1, we can clarify that tree abiding pseudo-elements are [nodes](https://dom.spec.whatwg.org/#concept-node) except the IDL is not web-exposed. Then use the already defined terms for append/remove for nodes. And all other specs which talk about nodes work as-is.

Or we go with the "Pseudo-element parents" definition in #8126, which talks about pseudo-elements having a list of pseudo-element children. Then add a point to the [Flat tree](https://w3c.github.io/csswg-drafts/css-scoping-1/#flat-tree) spec which includes pseudo-element trees in that traversal. Hopefully including it there clarifies how the box tree is generated and then everything else just works. This is what option 3 would build towards.

Now that I've read through the PR again, I quite like the way a pseudo-element tree is explained. It does feel like pulling in the DOM node concept will bring in functionality which was never intended to be supported by pseudo-elements. If the general idea is ok with css-pseudo editors, I'm good with option 3.

@fantasai @astearns what do you think? Other that VT pseudo-elements, this proposal would allow `::before` to be explained as a pseudo-element parent since it can be the originating element for `::marker` in the case of `::before::marker`.

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


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

Received on Thursday, 24 November 2022 16:07:55 UTC