[csswg-drafts] [css-scoping] :scope > * matches nothing in shadow trees (#11188)

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

== [css-scoping] :scope > * matches nothing in shadow trees ==
In https://github.com/w3c/csswg-drafts/issues/7261 (cc @emilio), @tabatkins concludes that:

> `myshadowroot.querySelector(":scope > *")` returns all the root nodes in the shadow tree.

But no it doesn't: in the context of a shadow tree, the shadow root is specified to be _replaced_ by the shadow host for the purposes of selector matching. This means that the node `:scope` represents here doesn't exist as far as selector matching is concerned. https://drafts.csswg.org/css-scoping-1/#host-element-in-tree


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


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

Received on Tuesday, 12 November 2024 22:26:18 UTC