Skip to content

Commit 5d8572f

Browse files
committed
[shadow-styling] No need to include the host element in the /shadow results.
1 parent 5460885 commit 5d8572f

2 files changed

Lines changed: 8 additions & 4 deletions

File tree

shadow-styling/Overview.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ <h3 class="heading settled heading" data-level=4.1 id=shadow-combinator><span cl
271271
<p> When a <dfn class=css-code data-dfn-type=selector data-export="" id=selectordef-shadow>/shadow<a class=self-link href=#selectordef-shadow></a></dfn> combinator is encountered in a selector,
272272
first filter the <a data-link-type=dfn href=http://dev.w3.org/csswg/selectors-4/#selector-match-list title="selector match list">selector match list</a> to only include elements with <a data-link-type=dfn href=#shadow-tree title="shadow trees">shadow trees</a>.
273273
Then replace every element in the <a data-link-type=dfn href=http://dev.w3.org/csswg/selectors-4/#selector-match-list title="selector match list">selector match list</a>
274-
with the <a data-link-type=dfn href=#host-element0 title="host element">host element</a> and <a data-link-type=dfn href=#top-level-element title="top-level elements">top-level elements</a> of each <a data-link-type=dfn href=#shadow-tree title="shadow tree">shadow tree</a> of the element.
274+
with the <a data-link-type=dfn href=#top-level-element title="top-level elements">top-level elements</a> of each <a data-link-type=dfn href=#shadow-tree title="shadow tree">shadow tree</a> of the element.
275275

276276
<div class=example>
277277
For example, say you had a component with a <a data-link-type=dfn href=#shadow-tree title="shadow tree">shadow tree</a> like the following:
@@ -300,7 +300,9 @@ <h3 class="heading settled heading" data-level=4.2 id=shadow-all-combinator><spa
300300
<p> When a <dfn class=css-code data-dfn-type=selector data-export="" id=selectordef-shadow-all>/shadow-all<a class=self-link href=#selectordef-shadow-all></a></dfn> combinator is encountered in a selector,
301301
first filter the <a data-link-type=dfn href=http://dev.w3.org/csswg/selectors-4/#selector-match-list title="selector match list">selector match list</a> to only include elements with <a data-link-type=dfn href=#shadow-tree title="shadow trees">shadow trees</a>.
302302
Then replace every element in the <a data-link-type=dfn href=http://dev.w3.org/csswg/selectors-4/#selector-match-list title="selector match list">selector match list</a>
303-
with all the elements in all the <a data-link-type=dfn href=#shadow-tree title="shadow trees">shadow trees</a> of the element.
303+
with the <a data-link-type=dfn href=#top-level-element title="top-level elements">top-level elements</a> of each <a data-link-type=dfn href=#shadow-tree title="shadow tree">shadow tree</a> of the element,
304+
and every element reachable by traversing any number of child lists
305+
from those elements.
304306

305307
<div class=example>
306308
For example, say you had a component with a <a data-link-type=dfn href=#shadow-tree title="shadow tree">shadow tree</a> like the following:

shadow-styling/Overview.src.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ <h3 id='shadow-combinator'>
143143
When a <dfn selector>/shadow</dfn> combinator is encountered in a selector,
144144
first filter the <a>selector match list</a> to only include elements with <a>shadow trees</a>.
145145
Then replace every element in the <a>selector match list</a>
146-
with the <a>host element</a> and <a>top-level elements</a> of each <a>shadow tree</a> of the element.
146+
with the <a>top-level elements</a> of each <a>shadow tree</a> of the element.
147147

148148
<div class='example'>
149149
For example, say you had a component with a <a>shadow tree</a> like the following:
@@ -174,7 +174,9 @@ <h3 id='shadow-all-combinator'>
174174
When a <dfn selector>/shadow-all</dfn> combinator is encountered in a selector,
175175
first filter the <a>selector match list</a> to only include elements with <a>shadow trees</a>.
176176
Then replace every element in the <a>selector match list</a>
177-
with all the elements in all the <a>shadow trees</a> of the element.
177+
with the <a>top-level elements</a> of each <a>shadow tree</a> of the element,
178+
and every element reachable by traversing any number of child lists
179+
from those elements.
178180

179181
<div class='example'>
180182
For example, say you had a component with a <a>shadow tree</a> like the following:

0 commit comments

Comments
 (0)