Skip to content

Commit 93e7cbc

Browse files
committed
[selectors-4] In a shadow tree, an unscoped :scope matches :host (not :root). #11000
1 parent 0474327 commit 93e7cbc

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

selectors-4/Overview.bs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ At Risk: [=user action pseudo-classes=] applying to non-[=tree-abiding pseudo-el
2828
At Risk: the '':blank'' pseudo-class
2929
Ignored Terms: function token, Document, DocumentFragment, math, h1, shadow tree, querySelector(), quirks mode, button, a, span, object, p, div, q, area, link, label, input, html, em, li, ol, pre, CSS Value Definition Syntax
3030
Ignored Vars: identifier, i
31+
Ignore MDN Failure: #the-target-within-pseudo
3132
</pre>
3233
<pre class=link-defaults>
3334
spec:css-values-4; type:dfn; text:identifier
@@ -2287,10 +2288,11 @@ The Reference Element Pseudo-class: '':scope''</h3>
22872288
or a virtual one (such as a {{DocumentFragment}}).
22882289

22892290
If there is no [=scoping root=]
2290-
then '':scope'' represents the root of the document
2291-
(equivalent to '':root'').
2291+
then '':scope'' represents the root of the tree the element is in
2292+
(equivalent to '':host'' in a [=shadow tree=],
2293+
or '':root'' otherwise).
22922294
Specifications intending for this pseudo-class to match specific elements
2293-
rather than the document's root element
2295+
rather than this tree root element
22942296
must define their [=scoping root|scoping root(s)=].
22952297

22962298
A virtual [=scoping root=] is some object representing the root of a document fragment,
@@ -2338,9 +2340,9 @@ User Action Pseudo-classes</h2>
23382340
match on that element's ancestors as well:
23392341
'':hover'', '':active'', '':focus-within''.
23402342
Specifically, if these match on a given element,
2341-
they also match on the element's [=flat-tree=] ancestors,
2343+
they also match on the element's [=flat tree=] ancestors,
23422344
up to and including the first [=top layer=] element
2343-
or the [=root=] element,
2345+
or the [=tree/root=] element,
23442346
whichever is encountered first.
23452347

23462348
Note: The specifics of hit-testing,

0 commit comments

Comments
 (0)