[csswg-drafts] [css-selectors-4] Clarification needed for scoped selectors (§3.3 and §8.6) (#5712)

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

== [css-selectors-4] Clarification needed for scoped selectors (§3.3 and §8.6) ==
Hi, I'm having a bit of a hard time understanding the terminology in CSS Selectors Level 4 regarding scoped selectors:

* [3.3 Scoped Selectors](https://drafts.csswg.org/selectors/#scoping)
* [8.6 The Reference Element Pseudo-class: `:scope`](https://drafts.csswg.org/selectors/#the-scope-pseudo)

In particular, I find it hard to follow what is meant by _scoping root_ vs. _:scope elements_ in the absence of examples pointing out which is which, in something like `elem.querySelector('...')`.

I'd love to provide more detailed suggestions on the content of the two sections, but I feel I need a mental model of what's meant in them. Could someone explain, in layman's terms, what a _scoping root_ and a _:scope element_ are for the commonplace DOM methods (matches/querySelector/querySelectorAll)?

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


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

Received on Tuesday, 10 November 2020 20:27:24 UTC