Skip to content

Commit c984027

Browse files
committed
[css-variables] Split apart custom properties chapter into sub-sections.
1 parent 954c216 commit c984027

2 files changed

Lines changed: 24 additions & 3 deletions

File tree

css-variables/Overview.html

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,10 @@ <h2 id="contents" class="no-num no-toc no-ref">Table of contents</h2>
7474
Introduction</a><ul class="toc"><li><a href="#module-interactions"><span class="secno">1.1 </span>
7575
Module Interactions</a></li><li><a href="#values"><span class="secno">1.2 </span>
7676
Values</a></li></ul></li><li><a href="#defining-variables"><span class="secno">2 </span>
77-
Defining Custom Properties: the <span data-autolink="property" href="#var-" class="property" title="var-*">var-*</span> family of properties</a></li><li><a href="#using-variables"><span class="secno">3 </span>
77+
Defining Custom Properties: the <span data-autolink="property" href="#var-" class="property" title="var-*">var-*</span> family of properties</a><ul class="toc"><li><a href="#syntax"><span class="secno">2.1 </span>
78+
Custom Property Value Syntax</a></li><li><a href="#using"><span class="secno">2.2 </span>
79+
Using Custom Properties</a></li><li><a href="#cycles"><span class="secno">2.3 </span>
80+
Resolving Dependency Cycles</a></li></ul></li><li><a href="#using-variables"><span class="secno">3 </span>
7881
Using Cascading Variables: the <span data-autolink="maybe" href="#variable-type" class="css">var()</span> notation</a><ul class="toc"><li><a href="#invalid-variables"><span class="secno">3.1 </span>
7982
Invalid Variables</a></li></ul></li><li><a href="#cssom"><span class="secno">4 </span>
8083
APIs</a><ul class="toc"><li><a href="#the-cssstyledeclaration-interface"><span class="secno">4.1 </span>
@@ -222,6 +225,9 @@ <h2 id="introduction" data-level="1"><span class="secno">1 </span>
222225
while using <span data-autolink="maybe" class="css">var(FOO)</span> will refer to the second.
223226
</p></div>
224227

228+
<h3 id="syntax" data-level="2.1"><span class="secno">2.1 </span>
229+
Custom Property Value Syntax</h3>
230+
225231
<p> The allowed syntax for <a data-autolink="link" href="#custom-property">custom properties</a> is extremely permissive.
226232
The <dfn id="any-value-production">&lt;any-value&gt;</dfn> production matches <em>any</em> sequence of one or more tokens,
227233
so long as the sequence does not contain
@@ -273,7 +279,10 @@ <h2 id="introduction" data-level="1"><span class="secno">1 </span>
273279
This initial value has a special interaction with the <a data-autolink="maybe" class="css" href="#variable-type">var()</a> notation,
274280
which is explained in the section defining <a data-autolink="maybe" class="css" href="#variable-type">var()</a>.
275281

276-
</p><p> The primary purpose of <a data-autolink="link" href="#custom-property">custom properties</a> is to define <a data-autolink="link" href="#cascading-variable">cascading variables</a>.
282+
</p><h3 id="using" data-level="2.2"><span class="secno">2.2 </span>
283+
Using Custom Properties</h3>
284+
285+
<p> The primary purpose of <a data-autolink="link" href="#custom-property">custom properties</a> is to define <a data-autolink="link" href="#cascading-variable">cascading variables</a>.
277286
In CSS, a <dfn title="variable|cascading variable" id="cascading-variable">cascading variable</dfn> is a value that can be substituted into other properties,
278287
allowing authors to "abstract" parts of their page's CSS out
279288
and reuse it in several places.
@@ -336,6 +345,9 @@ <h2 id="introduction" data-level="1"><span class="secno">1 </span>
336345
&lt;/div&gt;
337346
</pre> </div>
338347

348+
<h3 id="cycles" data-level="2.3"><span class="secno">2.3 </span>
349+
Resolving Dependency Cycles</h3>
350+
339351
<p> <a data-autolink="link" href="#custom-property">Custom properties</a> may use variables in their own values to build up composite variables.
340352
This can create cyclic dependencies
341353
where two or more <a data-autolink="link" href="#custom-property">custom properties</a> each attempt to use the variable that the other defines;
@@ -948,7 +960,7 @@ <h3 id="informative" class="no-num no-ref">
948960

949961
<h2 id="index" class="no-num no-ref">
950962
Index</h2>
951-
<div data-fill-with="index"><ul class="indexlist"><li>&lt;any-value&gt;, <a href="#any-value-production" title="section 2">2</a></li><li>associated style declaration, <a href="#associated-style-declaration" title="section 4.1">4.1</a></li><li>cascading variable, <a href="#cascading-variable" title="section 2">2</a></li><li>CSS declaration block declarations, <a href="#css-declaration-block-declarations" title="section 4.2">4.2</a></li><li>CSSStyleDeclaration, <a href="#cssstyledeclaration" title="section 4.1">4.1</a></li><li>CSSVariablesMap, <a href="#cssvariablesmap" title="section 4.2">4.2</a></li><li>custom property, <a href="#custom-property" title="section 2">2</a></li><li>invalid at computed-value time, <a href="#invalid-at-computed-value-time" title="section 3.1">3.1</a></li><li>invalid variable, <a href="#invalid-variable" title="section 3.1">3.1</a></li><li>resolve a variable, <a href="#resolve-a-variable" title="section 3">3</a></li><li>var(), <a href="#variable-type" title="section 3">3</a></li><li>var-*, <a href="#var-" title="section 2">2</a></li><li>&lt;variable&gt;, <a href="#variable-type" title="section 3">3</a></li><li>variable, <a href="#cascading-variable" title="section 2">2</a></li></ul></div>
963+
<div data-fill-with="index"><ul class="indexlist"><li>&lt;any-value&gt;, <a href="#any-value-production" title="section 2.1">2.1</a></li><li>associated style declaration, <a href="#associated-style-declaration" title="section 4.1">4.1</a></li><li>cascading variable, <a href="#cascading-variable" title="section 2.2">2.2</a></li><li>CSS declaration block declarations, <a href="#css-declaration-block-declarations" title="section 4.2">4.2</a></li><li>CSSStyleDeclaration, <a href="#cssstyledeclaration" title="section 4.1">4.1</a></li><li>CSSVariablesMap, <a href="#cssvariablesmap" title="section 4.2">4.2</a></li><li>custom property, <a href="#custom-property" title="section 2">2</a></li><li>invalid at computed-value time, <a href="#invalid-at-computed-value-time" title="section 3.1">3.1</a></li><li>invalid variable, <a href="#invalid-variable" title="section 3.1">3.1</a></li><li>resolve a variable, <a href="#resolve-a-variable" title="section 3">3</a></li><li>var(), <a href="#variable-type" title="section 3">3</a></li><li>var-*, <a href="#var-" title="section 2">2</a></li><li>&lt;variable&gt;, <a href="#variable-type" title="section 3">3</a></li><li>variable, <a href="#cascading-variable" title="section 2.2">2.2</a></li></ul></div>
952964

953965
<h2 id="property-index" class="no-num no-ref">
954966
Property index</h2>

css-variables/Overview.src.html

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,9 @@ <h2 id='defining-variables'>
152152
while using ''var(FOO)'' will refer to the second.
153153
</div>
154154

155+
<h3 id='syntax'>
156+
Custom Property Value Syntax</h3>
157+
155158
The allowed syntax for <a>custom properties</a> is extremely permissive.
156159
The <dfn>&lt;any-value></dfn> production matches <em>any</em> sequence of one or more tokens,
157160
so long as the sequence does not contain
@@ -205,6 +208,9 @@ <h2 id='defining-variables'>
205208
This initial value has a special interaction with the ''var()'' notation,
206209
which is explained in the section defining ''var()''.
207210

211+
<h3 id='using'>
212+
Using Custom Properties</h3>
213+
208214
The primary purpose of <a>custom properties</a> is to define <a>cascading variables</a>.
209215
In CSS, a <dfn title="variable|cascading variable">cascading variable</dfn> is a value that can be substituted into other properties,
210216
allowing authors to "abstract" parts of their page's CSS out
@@ -274,6 +280,9 @@ <h2 id='defining-variables'>
274280
</pre>
275281
</div>
276282

283+
<h3 id='cycles'>
284+
Resolving Dependency Cycles</h3>
285+
277286
<a>Custom properties</a> may use variables in their own values to build up composite variables.
278287
This can create cyclic dependencies
279288
where two or more <a>custom properties</a> each attempt to use the variable that the other defines;

0 commit comments

Comments
 (0)