Skip to content

Commit ae7a08a

Browse files
committed
[css-scoping] Actually define what it means for a document language to scope a stylesheet.
--HG-- extra : rebase_source : 8f5b84768a79382aa89ec28a6b73104c00af083d
1 parent e880a9e commit ae7a08a

2 files changed

Lines changed: 16 additions & 6 deletions

File tree

css-scoping/Overview.bs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,11 @@ Document Markup for Scoping</h4>
4848
defines a stylesheet that is scoped to the <a element>style</a> element’s parent element.
4949
[[HTML]]
5050

51+
The element that the stylesheet is scoped to
52+
is the <a>scoping root</a> for all the style rules in the stylesheet,
53+
and selectors of style rules in the stylesheet
54+
are <a>scope-contained</a> to the <a>scoping root</a>.
55+
5156
<h4 id='scope-atrule'>
5257
CSS Syntax for Scoping: the ''@scope'' rule</h4>
5358

css-scoping/Overview.html

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -112,10 +112,10 @@ <h2 class="no-num no-toc no-ref heading settled heading" id=contents><span class
112112
<li><a href=#scoping-mechanisms><span class=secno>2.1</span> Scoping Mechanisms</a>
113113
<ul class=toc>
114114
<li><a href=#scoping-markup><span class=secno>2.1.1</span> Document Markup for Scoping</a>
115-
<li><a href=#scope-atrule><span class=secno>2.1.2</span> CSS Syntax for Scoping: the <span class=css data-link-type=maybe title=@scope>@scope</span> rule</a></ul>
115+
<li><a href=#scope-atrule><span class=secno>2.1.2</span> CSS Syntax for Scoping: the <a class=css data-link-type=maybe href=#at-ruledef-scope title=@scope>@scope</a> rule</a></ul>
116116
<li><a href=#scoping-context><span class=secno>2.2</span> Querying the Scoping Context</a>
117117
<ul class=toc>
118-
<li><a href=#scope-pseudo><span class=secno>2.2.1</span> Selecting the Scoping Root: <span class=css data-link-type=maybe title=:scope>:scope</span> pseudo-class</a>
118+
<li><a href=#scope-pseudo><span class=secno>2.2.1</span> Selecting the Scoping Root: <a class=css data-link-type=maybe href=http://www.w3.org/TR/selectors4/#scope-pseudo title=:scope>:scope</a> pseudo-class</a>
119119
<li><a href=#scope-content-pseudo><span class=secno>2.2.2</span> Selecting Outside the Scope: <span class=css data-link-type=maybe title=:scope-context()>:scope-context()</span> pseudo-class</a></ul></ul>
120120
<li><a href=#shadow-dom><span class=secno>3</span> Shadow Encapsulation</a>
121121
<ul class=toc>
@@ -124,10 +124,10 @@ <h2 class="no-num no-toc no-ref heading settled heading" id=contents><span class
124124
<li><a href=#host-element><span class=secno>3.1.1</span> Host Elements in a Shadow Tree</a></ul>
125125
<li><a href=#selectors><span class=secno>3.2</span> Shadow DOM Selectors</a>
126126
<ul class=toc>
127-
<li><a href=#host-selector><span class=secno>3.2.1</span> Selecting Into the Light: the <span class=css data-link-type=maybe title=:host>:host</span>, <span class=css data-link-type=maybe title=:host()>:host()</span>, and <span class=css data-link-type=maybe title=:host-context()>:host-context()</span> pseudo-classes</a>
128-
<li><a href=#shadow-pseudoelement><span class=secno>3.2.2</span> Selecting Into the Dark: the <span class=css data-link-type=maybe title=::shadow>::shadow</span> pseudo-element</a>
129-
<li><a href=#content-combinator><span class=secno>3.2.3</span> Selecting Shadow-Projected Content: the <span class=css data-link-type=maybe title=::content>::content</span> pseudo-element</a>
130-
<li><a href=#deep-combinator><span class=secno>3.2.4</span> Selecting Through Shadows: the <span class=css data-link-type=maybe title=/deep/>/deep/</span> combinator</a></ul>
127+
<li><a href=#host-selector><span class=secno>3.2.1</span> Selecting Into the Light: the <a class=css data-link-type=maybe href=#selectordef-host0 title=:host>:host</a>, <a class=css data-link-type=maybe href=#selectordef-host title=:host()>:host()</a>, and <a class=css data-link-type=maybe href=#selectordef-host-context title=:host-context()>:host-context()</a> pseudo-classes</a>
128+
<li><a href=#shadow-pseudoelement><span class=secno>3.2.2</span> Selecting Into the Dark: the <a class=css data-link-type=maybe href=#selectordef-shadow title=::shadow>::shadow</a> pseudo-element</a>
129+
<li><a href=#content-combinator><span class=secno>3.2.3</span> Selecting Shadow-Projected Content: the <a class=css data-link-type=maybe href=#selectordef-content title=::content>::content</a> pseudo-element</a>
130+
<li><a href=#deep-combinator><span class=secno>3.2.4</span> Selecting Through Shadows: the <a class=css data-link-type=maybe href=#selectordef-deep title=/deep/>/deep/</a> combinator</a></ul>
131131
<li><a href=#shadow-cascading><span class=secno>3.3</span> Shadow Cascading &amp; Inheritance</a>
132132
<ul class=toc>
133133
<li><a href=#cascading><span class=secno>3.3.1</span> Cascading</a>
@@ -186,6 +186,11 @@ <h4 class="heading settled heading" data-level=2.1.1 id=scoping-markup><span cla
186186
defines a stylesheet that is scoped to the <a data-link-type=element href=http://www.w3.org/html/wg/drafts/html/CR/document-metadata.html#the-style-element title=style>style</a> element’s parent element.
187187
<a data-biblio-type=informative data-link-type=biblio href=#html title=html>[HTML]</a>
188188

189+
<p> The element that the stylesheet is scoped to
190+
is the <a data-link-type=dfn href=http://dev.w3.org/csswg/selectors-4/#scoping-root title="scoping root">scoping root</a> for all the style rules in the stylesheet,
191+
and selectors of style rules in the stylesheet
192+
are <a data-link-type=dfn href=http://dev.w3.org/csswg/selectors-4/#scope-contained- title=scope-contained>scope-contained</a> to the <a data-link-type=dfn href=http://dev.w3.org/csswg/selectors-4/#scoping-root title="scoping root">scoping root</a>.
193+
189194
<h4 class="heading settled heading" data-level=2.1.2 id=scope-atrule><span class=secno>2.1.2 </span><span class=content>
190195
CSS Syntax for Scoping: the <a class=css data-link-type=maybe href=#at-ruledef-scope title=@scope>@scope</a> rule</span><a class=self-link href=#scope-atrule></a></h4>
191196

0 commit comments

Comments
 (0)