Skip to content

Commit 8738ae5

Browse files
committed
[css-variables] Fix some examples.
--HG-- extra : rebase_source : 44071998d2ed62ba529eef28159cabf3782894f7
1 parent 600b67c commit 8738ae5

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

css-variables/Overview.bs

+3-3
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ Custom Property Value Syntax</h3>
147147
Note: While <<any-value>> must represent at least one token,
148148
that one token may be whitespace.
149149
This implies that ''--foo: ;'' is valid,
150-
and the corresponding ''var(foo)'' call would have a single space as its substitution value,
150+
and the corresponding ''var(--foo)'' call would have a single space as its substitution value,
151151
but ''--foo:;'' is invalid.
152152

153153
<div class='example'>
@@ -202,7 +202,7 @@ Custom Property Value Syntax</h3>
202202

203203
The preceding rule is equivalent to writing ''background-color: #06c;'',
204204
except that the variable name makes the origin of the color clearer,
205-
and if ''var(header-color)'' is used on other elements in the document,
205+
and if ''var(--header-color)'' is used on other elements in the document,
206206
all of the uses can be updated at once
207207
by changing the '--header-color' property on the root element.
208208
</div>
@@ -368,7 +368,7 @@ Using Cascading Variables: the ''var()'' notation</h2>
368368
which is used as the substitution value when the referenced <a>custom property</a> is invalid.
369369

370370
Note: The syntax of the fallback, like that of <a>custom properties</a>, allows commas.
371-
For example, ''var(foo, red, blue)'' defines a fallback of ''red, blue'';
371+
For example, ''var(--foo, red, blue)'' defines a fallback of ''red, blue'';
372372
that is, anything between the first comma and the end of the function is considered a fallback value.
373373

374374
A property value containing a ''var()'' function must be assumed to be valid at parse time.

css-variables/Overview.html

+5-5
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
</p>
5757
<h1 class="p-name no-ref" id=title>CSS Custom Properties for Cascading Variables Module Level 1</h1>
5858
<h2 class="no-num no-toc no-ref heading settled heading" id=subtitle><span class=content>Editor’s Draft,
59-
<span class=dt-updated><span class=value-title title=20140326>26 March 2014</span></span></span></h2>
59+
<span class=dt-updated><span class=value-title title=20140331>31 March 2014</span></span></span></h2>
6060
<div data-fill-with=spec-metadata><dl><dt>This version:<dd><a class=u-url href=http://dev.w3.org/csswg/css-variables/>http://dev.w3.org/csswg/css-variables/</a><dt>Latest version:<dd><a href=http://www.w3.org/TR/css-variables-1/>http://www.w3.org/TR/css-variables-1/</a><dt>Editor’s Draft:<dd><a href=http://dev.w3.org/csswg/css-variables/>http://dev.w3.org/csswg/css-variables/</a><dt>Previous Versions:<dd><a href=http://www.w3.org/TR/2013/WD-css-variables-1-20130620/ rel=previous>http://www.w3.org/TR/2013/WD-css-variables-1-20130620/</a><dd><a href=http://www.w3.org/TR/2013/WD-css-variables-20130312/ rel=previous>http://www.w3.org/TR/2013/WD-css-variables-20130312/</a><dd><a href=http://www.w3.org/TR/2012/WD-css-variables-20120410/ rel=previous>http://www.w3.org/TR/2012/WD-css-variables-20120410/</a>
6161
<dt>Feedback:</dt>
6262
<dd><a href="mailto:www-style@w3.org?subject=%5Bcss-variables%5D%20feedback">www-style@w3.org</a>
@@ -258,7 +258,7 @@ <h3 class="heading settled heading" data-level=2.1 id=syntax><span class=secno>2
258258
<p class=note> Note: While <a class="production css-code" data-link-type=type href=#typedef-any-value title="<any-value>">&lt;any-value&gt;</a> must represent at least one token,
259259
that one token may be whitespace.
260260
This implies that <span class=css data-link-type=propdesc title=--foo>--foo: ;</span> is valid,
261-
and the corresponding <span class=css data-link-type=maybe title=var(foo)>var(foo)</span> call would have a single space as its substitution value,
261+
and the corresponding <span class=css data-link-type=maybe title=var(--foo)>var(--foo)</span> call would have a single space as its substitution value,
262262
but <span class=css data-link-type=maybe title=--foo:;>--foo:;</span> is invalid.
263263

264264
<div class=example>
@@ -307,7 +307,7 @@ <h3 class="heading settled heading" data-level=2.1 id=syntax><span class=secno>2
307307
</pre>
308308
<p> The preceding rule is equivalent to writing <a class=css data-link-type=propdesc href=http://dev.w3.org/csswg/css-backgrounds-3/#background-color title=background-color>background-color: #06c;</a>,
309309
except that the variable name makes the origin of the color clearer,
310-
and if <span class=css data-link-type=maybe title=var(header-color)>var(header-color)</span> is used on other elements in the document,
310+
and if <span class=css data-link-type=maybe title=var(--header-color)>var(--header-color)</span> is used on other elements in the document,
311311
all of the uses can be updated at once
312312
by changing the '--header-color' property on the root element.
313313
</div>
@@ -439,7 +439,7 @@ <h2 class="heading settled heading" data-level=3 id=using-variables><span class=
439439
which is used as the substitution value when the referenced <a data-link-type=dfn href=#custom-property title="custom property">custom property</a> is invalid.
440440

441441
<p class=note> Note: The syntax of the fallback, like that of <a data-link-type=dfn href=#custom-property title="custom properties">custom properties</a>, allows commas.
442-
For example, <span class=css data-link-type=maybe title="var(foo, red, blue)">var(foo, red, blue)</span> defines a fallback of <span class=css data-link-type=maybe title="red, blue">red, blue</span>;
442+
For example, <span class=css data-link-type=maybe title="var(--foo, red, blue)">var(--foo, red, blue)</span> defines a fallback of <span class=css data-link-type=maybe title="red, blue">red, blue</span>;
443443
that is, anything between the first comma and the end of the function is considered a fallback value.
444444

445445
<p> A property value containing a <a class=css data-link-type=maybe href=#funcdef-var title=var()>var()</a> function must be assumed to be valid at parse time.
@@ -520,7 +520,7 @@ <h2 class="heading settled heading" data-level=3 id=using-variables><span class=
520520
<p> Again, this is <em>not</em> equivalent to setting <a class=css data-link-type=propdesc href=http://www.w3.org/TR/CSS21/box.html#propdef-margin-top title=margin-top>margin-top: 20px;</a> (a length).
521521
Instead, it’s equivalent to <a class=css data-link-type=propdesc href=http://www.w3.org/TR/CSS21/box.html#propdef-margin-top title=margin-top>margin-top: 20 px;</a> (a number followed by an ident),
522522
which is simply an invalid value for the <a class=property data-link-type=propdesc href=http://www.w3.org/TR/CSS21/box.html#propdef-margin-top title=margin-top>margin-top</a> property.
523-
Note, though, that <a class=css data-link-type=maybe href=http://dev.w3.org/csswg/css-values-3/#calc title=calc()>calc()</a> can be used to validly achieve the same thing, like so:
523+
Note, though, that <a class=css data-link-type=maybe href=http://dev.w3.org/csswg/css-values-3/#funcdef-calc title=calc()>calc()</a> can be used to validly achieve the same thing, like so:
524524

525525
<pre>.foo {
526526
--gap: 20;

0 commit comments

Comments
 (0)