Skip to content

Commit 8ada786

Browse files
committed
[shadow-styling] /shadow-deep/ -> /deep/, move it aorund in the document.
1 parent 7e89fd5 commit 8ada786

2 files changed

Lines changed: 94 additions & 69 deletions

File tree

shadow-styling/Overview.bs

Lines changed: 42 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -185,39 +185,6 @@ Shadow DOM Combinators</h2>
185185
<p class='issue'>
186186
I'm assuming here that "/foo/" is the syntax we'll agree on for named combinators.
187187

188-
<h3 id='shadow-deep-combinator'>
189-
Selecting Through All Shadows: the ''/shadow-deep/'' combinator</h3>
190-
191-
When a <dfn selector>/shadow-deep/</dfn> combinator is encountered in a selector,
192-
replace every element in the <a>selector match list</a>
193-
with every element reachable from the original element
194-
by traversing any number of child lists or shadow trees.
195-
196-
<div class='example'>
197-
For example, say you had a component with a <a>shadow tree</a> like the following:
198-
199-
<pre>
200-
&lt;x-foo>
201-
&lt;"shadow tree">
202-
&lt;div>
203-
&lt;span id="not-top">...&lt;/span>
204-
&lt;/div>
205-
&lt;span id="top">...&lt;/span>
206-
&lt;x-bar>
207-
&lt;"shadow tree">
208-
&lt;span id="nested">...&lt;/span>
209-
&lt;/>
210-
&lt;/x-bar>
211-
&lt;/>
212-
&lt;/x-foo>
213-
</pre>
214-
215-
For a stylesheet in the outer document,
216-
the selector ''x-foo /shadow-deep/ span''
217-
selects all three of <code>&lt;span></code> elements:
218-
''#top'', ''#not-top'', <em>and</em> ''#nested''.
219-
</div>
220-
221188
<h2 id='selectors'>
222189
Shadow DOM Selectors</h2>
223190

@@ -404,3 +371,45 @@ Selecting Distributed Elements: the ''::content'' pseudo-element</h3>
404371
However, since only the <a element>content</a> element has a <a>distribution list</a>,
405372
it's the only element that has a ''::content'' pseudo-element as well.
406373
</div>
374+
375+
376+
<h3 id='deep-combinator'>
377+
Selecting Through All Shadows: the ''/deep/'' combinator</h3>
378+
379+
When a <dfn selector>/deep/</dfn> combinator is encountered in a selector,
380+
replace every element in the <a>selector match list</a>
381+
with every element reachable from the original element
382+
by traversing any number of child lists or shadow trees.
383+
384+
<div class='example'>
385+
For example, say you had a component with a <a>shadow tree</a> like the following:
386+
387+
<pre>
388+
&lt;x-foo>
389+
&lt;"shadow tree">
390+
&lt;div>
391+
&lt;span id="not-top">...&lt;/span>
392+
&lt;/div>
393+
&lt;span id="top">...&lt;/span>
394+
&lt;x-bar>
395+
&lt;"shadow tree">
396+
&lt;span id="nested">...&lt;/span>
397+
&lt;/>
398+
&lt;/x-bar>
399+
&lt;/>
400+
&lt;/x-foo>
401+
</pre>
402+
403+
For a stylesheet in the outer document,
404+
the selector ''x-foo /deep/ span''
405+
selects all three of <code>&lt;span></code> elements:
406+
''#top'', ''#not-top'', <em>and</em> ''#nested''.
407+
</div>
408+
409+
<p class='issue'>
410+
This is basically a super-descendant combinator.
411+
If the descendant combinator had a real glyph,
412+
it would potentially be interesting to just double it.
413+
Maybe we can give the descendant combinator a pseudonym of ''>>'',
414+
as it itself is a super-child combinator?
415+
Then ''/deep/'' could be spelled ''>>>''

shadow-styling/Overview.html

Lines changed: 52 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -118,14 +118,13 @@ <h2 class="no-num no-toc no-ref heading settled heading" id=contents><span class
118118
<ul class=toc>
119119
<li><a href=#inheritance0><span class=secno>4.1</span> Inheritance and Shadow DOM</a></ul>
120120
<li><a href=#inheritance><span class=secno>5</span> Shadow DOM Combinators</a>
121-
<ul class=toc>
122-
<li><a href=#shadow-deep-combinator><span class=secno>5.1</span> Selecting Through All Shadows: the <span class=css data-link-type=maybe title=/shadow-deep/>/shadow-deep/</span> combinator</a></ul>
123121
<li><a href=#selectors><span class=secno>6</span> Shadow DOM Selectors</a>
124122
<ul class=toc>
125123
<li><a href=#host-selector><span class=secno>6.1</span> Selecting the Host Element: the <span class=css data-link-type=maybe title=:host>:host</span> and <span class=css data-link-type=maybe title=:host()>:host()</span> pseudo-classes</a>
126124
<li><a href=#ancestor-selector><span class=secno>6.2</span> Selecting Based on an Ancestor Outside the Shadow Tree: the <span class=css data-link-type=maybe title=:host-context()>:host-context()</span> pseudo-class</a>
127125
<li><a href=#shadow-pseudoelement><span class=secno>6.3</span> Selecting the Shadow Root Itself: the <span class=css data-link-type=maybe title=::shadow>::shadow</span> pseudo-element</a>
128-
<li><a href=#content-combinator><span class=secno>6.4</span> Selecting Distributed Elements: the <span class=css data-link-type=maybe title=::content>::content</span> pseudo-element</a></ul>
126+
<li><a href=#content-combinator><span class=secno>6.4</span> Selecting Distributed Elements: the <span class=css data-link-type=maybe title=::content>::content</span> pseudo-element</a>
127+
<li><a href=#deep-combinator><span class=secno>6.5</span> Selecting Through All Shadows: the <span class=css data-link-type=maybe title=/deep/>/deep/</span> combinator</a></ul>
129128
<li><a href=#conformance><span class=secno></span> Conformance</a>
130129
<ul class=toc>
131130
<li><a href=#conventions><span class=secno></span> Document conventions</a>
@@ -317,37 +316,6 @@ <h2 class="heading settled heading" data-level=5 id=inheritance><span class=secn
317316
<p class=issue id=issue-46cdc4d6><a class=self-link href=#issue-46cdc4d6></a>
318317
I’m assuming here that "/foo/" is the syntax we’ll agree on for named combinators.
319318

320-
<h3 class="heading settled heading" data-level=5.1 id=shadow-deep-combinator><span class=secno>5.1 </span><span class=content>
321-
Selecting Through All Shadows: the <a class=css data-link-type=maybe href=#selectordef-shadow-deep title=/shadow-deep/>/shadow-deep/</a> combinator</span><a class=self-link href=#shadow-deep-combinator></a></h3>
322-
323-
<p> When a <dfn class=css-code data-dfn-type=selector data-export="" id=selectordef-shadow-deep>/shadow-deep/<a class=self-link href=#selectordef-shadow-deep></a></dfn> combinator is encountered in a selector,
324-
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>
325-
with every element reachable from the original element
326-
by traversing any number of child lists or shadow trees.
327-
328-
<div class=example>
329-
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:
330-
331-
<pre> &lt;x-foo&gt;
332-
&lt;"shadow tree"&gt;
333-
&lt;div&gt;
334-
&lt;span id="not-top"&gt;...&lt;/span&gt;
335-
&lt;/div&gt;
336-
&lt;span id="top"&gt;...&lt;/span&gt;
337-
&lt;x-bar&gt;
338-
&lt;"shadow tree"&gt;
339-
&lt;span id="nested"&gt;...&lt;/span&gt;
340-
&lt;/&gt;
341-
&lt;/x-bar&gt;
342-
&lt;/&gt;
343-
&lt;/x-foo&gt;
344-
</pre>
345-
<p> For a stylesheet in the outer document,
346-
the selector <span class=css data-link-type=maybe title="x-foo /shadow-deep/ span">x-foo /shadow-deep/ span</span>
347-
selects all three of <code>&lt;span&gt;</code> elements:
348-
<span class=css data-link-type=maybe title=#top>#top</span>, <span class=css data-link-type=maybe title=#not-top>#not-top</span>, <em>and</em> <span class=css data-link-type=maybe title=#nested>#nested</span>.
349-
</div>
350-
351319
<h2 class="heading settled heading" data-level=6 id=selectors><span class=secno>6 </span><span class=content>
352320
Shadow DOM Selectors</span><a class=self-link href=#selectors></a></h2>
353321

@@ -527,6 +495,46 @@ <h3 class="heading settled heading" data-level=6.4 id=content-combinator><span c
527495
it’s the only element that has a <a class=css data-link-type=maybe href=#selectordef-content title=::content>::content</a> pseudo-element as well.
528496
</div>
529497

498+
499+
<h3 class="heading settled heading" data-level=6.5 id=deep-combinator><span class=secno>6.5 </span><span class=content>
500+
Selecting Through All Shadows: the <a class=css data-link-type=maybe href=#selectordef-deep title=/deep/>/deep/</a> combinator</span><a class=self-link href=#deep-combinator></a></h3>
501+
502+
<p> When a <dfn class=css-code data-dfn-type=selector data-export="" id=selectordef-deep>/deep/<a class=self-link href=#selectordef-deep></a></dfn> combinator is encountered in a selector,
503+
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>
504+
with every element reachable from the original element
505+
by traversing any number of child lists or shadow trees.
506+
507+
<div class=example>
508+
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:
509+
510+
<pre> &lt;x-foo&gt;
511+
&lt;"shadow tree"&gt;
512+
&lt;div&gt;
513+
&lt;span id="not-top"&gt;...&lt;/span&gt;
514+
&lt;/div&gt;
515+
&lt;span id="top"&gt;...&lt;/span&gt;
516+
&lt;x-bar&gt;
517+
&lt;"shadow tree"&gt;
518+
&lt;span id="nested"&gt;...&lt;/span&gt;
519+
&lt;/&gt;
520+
&lt;/x-bar&gt;
521+
&lt;/&gt;
522+
&lt;/x-foo&gt;
523+
</pre>
524+
<p> For a stylesheet in the outer document,
525+
the selector <span class=css data-link-type=maybe title="x-foo /deep/ span">x-foo /deep/ span</span>
526+
selects all three of <code>&lt;span&gt;</code> elements:
527+
<span class=css data-link-type=maybe title=#top>#top</span>, <span class=css data-link-type=maybe title=#not-top>#not-top</span>, <em>and</em> <span class=css data-link-type=maybe title=#nested>#nested</span>.
528+
</div>
529+
530+
<p class=issue id=issue-250ee37f><a class=self-link href=#issue-250ee37f></a>
531+
This is basically a super-descendant combinator.
532+
If the descendant combinator had a real glyph,
533+
it would potentially be interesting to just double it.
534+
Maybe we can give the descendant combinator a pseudonym of <span class=css data-link-type=maybe title=">>">&gt;&gt;</span>,
535+
as it itself is a super-child combinator?
536+
Then <a class=css data-link-type=maybe href=#selectordef-deep title=/deep/>/deep/</a> could be spelled <span class=css data-link-type=maybe title=">>>">&gt;&gt;&gt;</span>
537+
530538
<h2 class="no-ref no-num heading settled heading" id=conformance><span class=content>
531539
Conformance</span><a class=self-link href=#conformance></a></h2>
532540

@@ -663,14 +671,14 @@ <h2 class="no-num no-ref heading settled heading" id=index><span class=content>
663671
<div data-fill-with=index><ul class=indexlist>
664672
<li>active shadow tree, <a href=#active-shadow-tree title="section 2.1">2.1</a>
665673
<li>::content, <a href=#selectordef-content title="section 6.4">6.4</a>
674+
<li>/deep/, <a href=#selectordef-deep title="section 6.5">6.5</a>
666675
<li>distribution list, <a href=#distribution-list title="section 2.2">2.2</a>
667676
<li>:host(), <a href=#selectordef-host title="section 6.1">6.1</a>
668677
<li>:host, <a href=#selectordef-host0 title="section 6.1">6.1</a>
669678
<li>:host-context(), <a href=#selectordef-host-context title="section 6.2">6.2</a>
670679
<li>host element, <a href=#host-element0 title="section 2.1">2.1</a>
671680
<li>insertion point, <a href=#insertion-point title="section 2.2">2.2</a>
672681
<li>::shadow, <a href=#selectordef-shadow title="section 6.3">6.3</a>
673-
<li>/shadow-deep/, <a href=#selectordef-shadow-deep title="section 5.1">5.1</a>
674682
<li>shadow host, <a href=#shadow-host title="section 2.1">2.1</a>
675683
<li>shadow root, <a href=#shadow-root title="section 2.1">2.1</a>
676684
<li>shadow tree, <a href=#shadow-tree title="section 2.1">2.1</a>
@@ -685,4 +693,12 @@ <h2 class="no-num no-ref heading settled heading" id=property-index><span class=
685693
<h2 class="no-num heading settled" id=issues-index><span class=content>Issues Index</span><a class=self-link href=#issues-index></a></h2><div style="counter-reset: issue"><div class=issue>
686694
I’m assuming here that "/foo/" is the syntax we’ll agree on for named combinators.
687695

688-
<a href=#issue-46cdc4d6></a></div></div>
696+
<a href=#issue-46cdc4d6></a></div><div class=issue>
697+
This is basically a super-descendant combinator.
698+
If the descendant combinator had a real glyph,
699+
it would potentially be interesting to just double it.
700+
Maybe we can give the descendant combinator a pseudonym of <span class=css data-link-type=maybe title=">>">&gt;&gt;</span>,
701+
as it itself is a super-child combinator?
702+
Then <a class=css data-link-type=maybe href=#selectordef-deep title=/deep/>/deep/</a> could be spelled <span class=css data-link-type=maybe title=">>>">&gt;&gt;&gt;</span>
703+
704+
<a href=#issue-250ee37f></a></div></div>

0 commit comments

Comments
 (0)