You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Extensions to the Selectors Data Model</a><ulclass=toc><li><ahref=#host-element><spanclass=secno>3.1</span>
115
115
Host Elements in a Shadow Tree</a></ul><li><ahref=#inheritance><spanclass=secno>4</span>
116
116
Shadow DOM Combinators</a><ulclass=toc><li><ahref=#shadow-combinator><spanclass=secno>4.1</span>
117
-
Selecting Into A Shadow Tree: the <spanclass=cssdata-link-type=maybetitle=/shadow>/shadow</span> combinator</a><li><ahref=#shadow-all-combinator><spanclass=secno>4.2</span>
117
+
Selecting Into A Shadow Tree: the <spanclass=cssdata-link-type=maybetitle=/shadow/>/shadow/</span> combinator</a><li><ahref=#shadow-all-combinator><spanclass=secno>4.2</span>
118
118
Selecting All Elements In A Shadow Tree: the <spanclass=cssdata-link-type=maybetitle=/shadow-all>/shadow-all</span> combinator</a><li><ahref=#shadow-deep-combinator><spanclass=secno>4.3</span>
119
-
Selecting Through All Shadows: the <spanclass=cssdata-link-type=maybetitle=/shadow-deep>/shadow-deep</span> combinator</a><li><ahref=#content-combinator><spanclass=secno>4.4</span>
120
-
Selecting Distributed Elements: the <spanclass=cssdata-link-type=maybetitle=/content>/content</span> combinator</a></ul><li><ahref=#selectors><spanclass=secno>5</span>
119
+
Selecting Through All Shadows: the <spanclass=cssdata-link-type=maybetitle=/shadow-deep/>/shadow-deep/</span> combinator</a><li><ahref=#content-combinator><spanclass=secno>4.4</span>
120
+
Selecting Distributed Elements: the <spanclass=cssdata-link-type=maybetitle=/content/>/content/</span> combinator</a></ul><li><ahref=#selectors><spanclass=secno>5</span>
121
121
Shadow DOM Selectors</a><ulclass=toc><li><ahref=#top-selector><spanclass=secno>5.1</span>
122
122
Selecting Root-like Elements: the <spanclass=cssdata-link-type=maybetitle=:top>:top</span> pseudo-class</a><li><ahref=#host-selector><spanclass=secno>5.2</span>
123
123
Selecting the Host Element: the <spanclass=cssdata-link-type=maybetitle=:host>:host</span> and <spanclass=cssdata-link-type=maybetitle=:host()>:host()</span> pseudo-classes</a><li><ahref=#ancestor-selector><spanclass=secno>5.3</span>
which does not include the <adata-link-type=dfnhref=#shadow-treetitle="shadow trees">shadow trees</a> or <adata-link-type=dfnhref=#distribution-listtitle="distribution lists">distribution lists</a> of the element.
207
207
208
208
<p> When a selector is matched against a <adata-link-type=dfnhref=#shadow-treetitle="shadow tree">shadow tree</a>,
209
-
the <adata-link-type=dfntitle="initial selector match list">initial selector match list</a>
209
+
the <adata-link-type=dfnhref=http://dev.w3.org/csswg/selectors-4/#initial-selector-match-listtitle="initial selector match list">initial selector match list</a>
210
210
is the <adata-link-type=dfnhref=#shadow-hosttitle="shadow host">shadow host</a>,
211
211
followed by all the <adata-link-type=dfnhref=#top-level-elementtitle="top-level elements">top-level elements</a> of the <adata-link-type=dfnhref=#shadow-treetitle="shadow tree">shadow tree</a>
to help style the contents of <adata-link-type=dfnhref=#shadow-treetitle="shadow trees">shadow trees</a> and <adata-link-type=dfnhref=#distribution-listtitle="distribution lists">distribution lists</a>.
Selecting Into A Shadow Tree: the <aclass=cssdata-link-type=maybehref=#selectordef-shadowtitle=/shadow>/shadow</a> combinator</span><aclass=self-linkhref=#shadow-combinator></a></h3>
269
+
Selecting Into A Shadow Tree: the <aclass=cssdata-link-type=maybehref=#selectordef-shadowtitle=/shadow/>/shadow/</a> combinator</span><aclass=self-linkhref=#shadow-combinator></a></h3>
270
270
271
-
<p> When a <dfnclass=css-codedata-dfn-type=selectordata-export="" id=selectordef-shadow>/shadow<aclass=self-linkhref=#selectordef-shadow></a></dfn> combinator is encountered in a selector,
271
+
<p> When a <dfnclass=css-codedata-dfn-type=selectordata-export="" id=selectordef-shadow>/shadow/<aclass=self-linkhref=#selectordef-shadow></a></dfn> combinator is encountered in a selector,
272
272
first filter the <adata-link-type=dfnhref=http://dev.w3.org/csswg/selectors-4/#selector-match-listtitle="selector match list">selector match list</a> to only include elements with <adata-link-type=dfnhref=#shadow-treetitle="shadow trees">shadow trees</a>.
273
273
Then replace every element in the <adata-link-type=dfnhref=http://dev.w3.org/csswg/selectors-4/#selector-match-listtitle="selector match list">selector match list</a>
274
274
with the <adata-link-type=dfnhref=#top-level-elementtitle="top-level elements">top-level elements</a> of each <adata-link-type=dfnhref=#shadow-treetitle="shadow tree">shadow tree</a> of the element.
but not <spanclass=cssdata-link-type=maybetitle=#not-top>#not-top</span>,
291
291
because it’s not a <adata-link-type=dfnhref=#top-level-elementtitle="top-level element">top-level element</a> in the <adata-link-type=dfnhref=#shadow-treetitle="shadow tree">shadow tree</a>.
292
292
293
293
<p> If one wanted to target <spanclass=cssdata-link-type=maybetitle=#not-top>#not-top</span>,
294
-
one way to do it would be with <spanclass=cssdata-link-type=maybetitle="x-foo /shadow div > span">x-foo /shadow div > span</span>.
294
+
one way to do it would be with <spanclass=cssdata-link-type=maybetitle="x-foo /shadow/ div > span">x-foo /shadow/ div > span</span>.
Selecting All Elements In A Shadow Tree: the <aclass=cssdata-link-type=maybehref=#selectordef-shadow-alltitle=/shadow-all>/shadow-all</a> combinator</span><aclass=self-linkhref=#shadow-all-combinator></a></h3>
298
+
Selecting All Elements In A Shadow Tree: the <spanclass=cssdata-link-type=maybetitle=/shadow-all>/shadow-all</span> combinator</span><aclass=self-linkhref=#shadow-all-combinator></a></h3>
299
299
300
-
<p> When a <dfnclass=css-codedata-dfn-type=selectordata-export="" id=selectordef-shadow-all>/shadow-all<aclass=self-linkhref=#selectordef-shadow-all></a></dfn> combinator is encountered in a selector,
300
+
<p> When a <dfnclass=css-codedata-dfn-type=selectordata-export="" id=selectordef-shadow-all>/shadow-all/<aclass=self-linkhref=#selectordef-shadow-all></a></dfn> combinator is encountered in a selector,
301
301
first filter the <adata-link-type=dfnhref=http://dev.w3.org/csswg/selectors-4/#selector-match-listtitle="selector match list">selector match list</a> to only include elements with <adata-link-type=dfnhref=#shadow-treetitle="shadow trees">shadow trees</a>.
302
302
Then replace every element in the <adata-link-type=dfnhref=http://dev.w3.org/csswg/selectors-4/#selector-match-listtitle="selector match list">selector match list</a>
303
303
with the <adata-link-type=dfnhref=#top-level-elementtitle="top-level elements">top-level elements</a> of each <adata-link-type=dfnhref=#shadow-treetitle="shadow tree">shadow tree</a> of the element,
the selector <spanclass=cssdata-link-type=maybetitle="x-foo /shadow-all span">x-foo /shadow-all span</span>
325
+
the selector <spanclass=cssdata-link-type=maybetitle="x-foo /shadow-all/ span">x-foo /shadow-all/ span</span>
326
326
selects <spanclass=cssdata-link-type=maybetitle=#top>#top</span> and <spanclass=cssdata-link-type=maybetitle=#not-top>#not-top</span>.
327
327
It does not match <spanclass=cssdata-link-type=maybetitle=#nested>#nested</span>,
328
328
as that element is further nested in the <adata-link-type=dfnhref=#shadow-treetitle="shadow tree">shadow tree</a> of the <code><x-bar></code> component.
Selecting Through All Shadows: the <aclass=cssdata-link-type=maybehref=#selectordef-shadow-deeptitle=/shadow-deep>/shadow-deep</a> combinator</span><aclass=self-linkhref=#shadow-deep-combinator></a></h3>
332
+
Selecting Through All Shadows: the <aclass=cssdata-link-type=maybehref=#selectordef-shadow-deeptitle=/shadow-deep/>/shadow-deep/</a> combinator</span><aclass=self-linkhref=#shadow-deep-combinator></a></h3>
333
333
334
-
<p> When a <dfnclass=css-codedata-dfn-type=selectordata-export="" id=selectordef-shadow-deep>/shadow-deep<aclass=self-linkhref=#selectordef-shadow-deep></a></dfn> combinator is encountered in a selector,
334
+
<p> When a <dfnclass=css-codedata-dfn-type=selectordata-export="" id=selectordef-shadow-deep>/shadow-deep/<aclass=self-linkhref=#selectordef-shadow-deep></a></dfn> combinator is encountered in a selector,
335
335
replace every element in the <adata-link-type=dfnhref=http://dev.w3.org/csswg/selectors-4/#selector-match-listtitle="selector match list">selector match list</a>
336
336
with every element reachable from the original element
337
337
by traversing any number of child lists or shadow trees.
Selecting Distributed Elements: the <aclass=cssdata-link-type=maybehref=#selectordef-contenttitle=/content>/content</a> combinator</span><aclass=self-linkhref=#content-combinator></a></h3>
363
+
Selecting Distributed Elements: the <aclass=cssdata-link-type=maybehref=#selectordef-contenttitle=/content/>/content/</a> combinator</span><aclass=self-linkhref=#content-combinator></a></h3>
364
364
365
-
<p> When a <dfnclass=css-codedata-dfn-type=selectordata-export="" id=selectordef-content>/content<aclass=self-linkhref=#selectordef-content></a></dfn> combinator is encountered in a selector,
365
+
<p> When a <dfnclass=css-codedata-dfn-type=selectordata-export="" id=selectordef-content>/content/<aclass=self-linkhref=#selectordef-content></a></dfn> combinator is encountered in a selector,
366
366
first filter the <adata-link-type=dfnhref=http://dev.w3.org/csswg/selectors-4/#selector-match-listtitle="selector match list">selector match list</a> to only include elements with <adata-link-type=dfnhref=#distribution-listtitle="distribution lists">distribution lists</a>.
367
367
Then replace every element in the <adata-link-type=dfnhref=http://dev.w3.org/csswg/selectors-4/#selector-match-listtitle="selector match list">selector match list</a>
368
368
with the elements in the <adata-link-type=dfnhref=#distribution-listtitle="distribution list">distribution list</a> of each element.
0 commit comments