Skip to content

Commit 2d68817

Browse files
committed
[css-variables] bikeshed
1 parent 20eef68 commit 2d68817

1 file changed

Lines changed: 28 additions & 28 deletions

File tree

css-variables/Overview.html

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
<img alt=W3C height=48 src=http://www.w3.org/Icons/w3c_home width=72>
1212
</a></p>
1313
<h1 class="p-name no-ref" id=title>CSS Custom Properties for Cascading Variables Module Level 1</h1>
14-
<h2 class="no-num no-toc no-ref" id=subtitle><span class=content>Editor's Draft,
15-
<span class=dt-updated><span class=value-title title=20130826>26 August 2013</span></span></span></h2>
16-
<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-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>
14+
<h2 class="no-num no-toc no-ref" id=subtitle><span class=content>Editors Draft,
15+
<span class=dt-updated><span class=value-title title=20130828>28 August 2013</span></span></span></h2>
16+
<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>Editors 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-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>
1717
<dt>Feedback:</dt>
1818
<dd><a href="mailto:www-style@w3.org?subject=%5Bcss-variables%5D%20feedback">www-style@w3.org</a>
1919
with subject line
@@ -36,7 +36,7 @@ <h2 class="no-num no-toc no-ref" id=status><span class=content>Status of this do
3636
This is a public copy of the editors' draft.
3737
It is provided for discussion only and may change at any moment.
3838
Its publication here does not imply endorsement of its contents by W3C.
39-
Don't cite this document other than as work in progress.
39+
Dont cite this document other than as work in progress.
4040

4141
<p>
4242
The (<a href=http://lists.w3.org/Archives/Public/www-style/>archived</a>) public mailing list
@@ -107,7 +107,7 @@ <h2 data-level=1 id=introduction><span class=secno>1 </span><span class=content>
107107
a site may establish a color scheme
108108
and reuse three or four colors throughout the site.
109109
Altering this data can be difficult and error-prone,
110-
since it's scattered throughout the CSS file
110+
since its scattered throughout the CSS file
111111
(and possibly across multiple files),
112112
and may not be amenable to Find-and-Replace.
113113

@@ -146,7 +146,7 @@ <h2 data-level=2 id=defining-variables><span class=secno>2 </span><span class=co
146146
<p> This specification defines an open-ended set of properties called <a href=#custom-property>custom properties</a>,
147147
which are used to define <a href=#cascading-variable>variables</a>.
148148

149-
<table class=propdef><tr><th>Name:<td><dfn data-dfn-type=property data-export="" id=propdef-var->var-*</dfn><tr><th>Value:<td><a class=production data-link-type=type href=#typedef-any-value>&lt;any-value&gt;</a><tr><th>Initial:<td>(nothing, see prose)<tr><th>Applies to:<td>all elements<tr><th>Inherited:<td>yes<tr><th>Computed value:<td>specified value with variables substituted (but see prose for "invalid variables")<tr><th>Media:<td>all<tr><th>Animatable:<td>no</table>
149+
<table class=propdef><tr><th>Name:<td><dfn data-dfn-type=property data-export="" id=propdef-var->var-*</dfn><tr><th>Value:<td><a class=production data-link-type=type href=#typedef-any-value>&lt;any-value&gt;</a><tr><th>Initial:<td>(nothing, see prose)<tr><th>Applies to:<td>all elements<tr><th>Inherited:<td>yes<tr><th>Media:<td>all<tr><th>Computed value:<td>specified value with variables substituted (but see prose for "invalid variables")<tr><th>Animatable:<td>no</table>
150150
<p class=issue>
151151
Should variables have special animation behavior,
152152
such that they just never animate,
@@ -162,7 +162,7 @@ <h2 data-level=2 id=defining-variables><span class=secno>2 </span><span class=co
162162
so that the part after the "var-" is an identifier by itself,
163163
so that it can be referenced without <a href=http://www.w3.org/TR/CSS21/syndata.html#escaped-characters>character escaping</a>.
164164
For example, <a class=property data-link-type=propdesc title=var-0>var-0</a> needs to be referenced as <span class=css data-link-type=maybe>var(\30)</span>,
165-
because <span class=css data-link-type=maybe>0</span> isn't a valid identifier.
165+
because <span class=css data-link-type=maybe>0</span> isnt a valid identifier.
166166
(U+0030 is the hexadecimal code for the <span class=css data-link-type=maybe>0</span> character.)
167167

168168
<div class=example>
@@ -196,7 +196,7 @@ <h2 data-level=2 id=defining-variables><span class=secno>2 </span><span class=co
196196

197197
<div class=example>
198198
For example, <span class=css data-link-type=maybe>VAR-FOO</span> is invalid,
199-
because the prefix isn't "var-".
199+
because the prefix isnt "var-".
200200

201201
<p> While both <span class=css data-link-type=maybe>var-foo</span> and <span class=css data-link-type=maybe>var-FOO</span> are valid,
202202
they are distinct properties -
@@ -210,8 +210,8 @@ <h2 data-level=2 id=defining-variables><span class=secno>2 </span><span class=co
210210
<p> The <a data-link-spec=css-values href=http://dev.w3.org/csswg/css-values-3/#css-wide-keywords>CSS-wide keywords</a> can be used in custom properties,
211211
with the same meaning as in any another property.
212212

213-
<p class=note> Note: That is, they're interpreted at cascaded-value time as normal,
214-
and are not preserved as the custom property's value,
213+
<p class=note> Note: That is, theyre interpreted at cascaded-value time as normal,
214+
and are not preserved as the custom propertys value,
215215
and thus are not substituted in by the corresponding variable.
216216

217217
<h3 data-level=2.1 id=syntax><span class=secno>2.1 </span><span class=content>
@@ -233,7 +233,7 @@ <h3 data-level=2.1 id=syntax><span class=secno>2.1 </span><span class=content>
233233
when reserialized.
234234

235235
<p class=note> Note: Custom properties can contain a trailing <span class=css data-link-type=maybe>!important</span>,
236-
but this is automatically removed from the property's value by the CSS parser,
236+
but this is automatically removed from the propertys value by the CSS parser,
237237
and makes the custom property "important" in the CSS cascade.
238238
In other words, the prohibition on top-level "!" characters
239239
does not prevent <span class=css data-link-type=maybe>!important</span> from being used,
@@ -261,7 +261,7 @@ <h3 data-level=2.1 id=syntax><span class=secno>2.1 </span><span class=content>
261261
and must be preserved in their original author-given casing.
262262
(Many CSS values are case-insensitive,
263263
which user agents can take advantage of by "canonicalizing" them into a single casing,
264-
but that isn't allowed for custom properties.)
264+
but that isnt allowed for custom properties.)
265265

266266
<p> The initial value of a <a href=#custom-property>custom property</a> is an empty value;
267267
that is, nothing at all.
@@ -273,7 +273,7 @@ <h3 data-level=2.2 id=using><span class=secno>2.2 </span><span class=content>
273273

274274
<p> The primary purpose of <a href=#custom-property>custom properties</a> is to define <a href=#cascading-variable>cascading variables</a>.
275275
In CSS, a <dfn data-dfn-type=dfn data-noexport="" id=cascading-variable title="variable|cascading variable">cascading variable</dfn> is a value that can be substituted into other properties,
276-
allowing authors to "abstract" parts of their page's CSS out
276+
allowing authors to "abstract" parts of their pages CSS out
277277
and reuse it in several places.
278278
Every <a href=#custom-property>custom property</a> defines a corresponding <a href=#cascading-variable>variable</a>
279279
with the same name, minus the "var-" prefix.
@@ -313,7 +313,7 @@ <h3 data-level=2.2 id=using><span class=secno>2.2 </span><span class=content>
313313
so they can be declared on any element,
314314
are resolved with the normal inheritance and cascade rules,
315315
can be made conditional with <span class=css data-link-type=maybe>@media</span> and other conditional rules,
316-
can be used in HTML's <code>style</code> attribute,
316+
can be used in HTMLs <code>style</code> attribute,
317317
can be read or set using the CSSOM, etc..
318318

319319
<div class=example>
@@ -330,7 +330,7 @@ <h3 data-level=2.2 id=using><span class=secno>2.2 </span><span class=content>
330330
&lt;div&gt;I got green set directly on me!&lt;/div&gt;
331331
&lt;div id='alert'&gt;
332332
While I got red set directly on me!
333-
&lt;p&gt;I'm red too, because of inheritance!&lt;/p&gt;
333+
&lt;p&gt;Im red too, because of inheritance!&lt;/p&gt;
334334
&lt;/div&gt;
335335
</pre> </div>
336336

@@ -459,7 +459,7 @@ <h2 data-level=3 id=using-variables><span class=secno>3 </span><span class=conte
459459
It is only syntax-checked at computed-value time,
460460
after variable references have been <a href=#resolve-a-variable title="resolve a variable">resolved</a>.
461461

462-
<p> To <dfn data-dfn-type=dfn data-noexport="" id=resolve-a-variable>resolve a variable</dfn> in a property's value:
462+
<p> To <dfn data-dfn-type=dfn data-noexport="" id=resolve-a-variable>resolve a variable</dfn> in a propertys value:
463463

464464
<ol>
465465
<li>
@@ -485,26 +485,26 @@ <h2 data-level=3 id=using-variables><span class=secno>3 </span><span class=conte
485485
an author may create a component
486486
intended to be included in a larger application,
487487
and use variables to style it
488-
so that it's easy for the author of the larger application
488+
so that its easy for the author of the larger application
489489
to theme the component to match the rest of the app.
490490

491491
<p> Without fallback,
492492
the app author must supply a value for every variable that your component uses.
493493
With fallback, the component author can supply defaults,
494494
so the app author only needs to supply values for the variables they wish to override.
495495

496-
<pre>/* In the component's style: */
496+
<pre>/* In the components style: */
497497
.component .header {
498498
color: var(header-color, blue);
499499
}
500500
.component .text {
501501
color: var(text-color, black);
502502
}
503503

504-
/* In the larger application's style: */
504+
/* In the larger applications style: */
505505
.component {
506506
var-text-color: #080;
507-
/* header-color isn't set,
507+
/* header-color isnt set,
508508
and so remains blue,
509509
the fallback value */
510510
}
@@ -522,15 +522,15 @@ <h2 data-level=3 id=using-variables><span class=secno>3 </span><span class=conte
522522
Instead, the second declaration is simply thrown away as a syntax error
523523
for having an invalid property name.
524524

525-
<p> Similarly, you can't build up a single token where part of it is provided by a variable:
525+
<p> Similarly, you cant build up a single token where part of it is provided by a variable:
526526

527527
<pre>.foo {
528528
var-gap: 20;
529529
margin-top: var(gap)px;
530530
}
531531
</pre>
532532
<p> Again, this is <em>not</em> equivalent to setting <a class=css data-link-type=maybe href=http://www.w3.org/TR/CSS21/box.html#propdef-margin-top title=margin-top>margin-top: 20px;</a> (a length).
533-
Instead, it's equivalent to <a class=css data-link-type=maybe 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),
533+
Instead, its equivalent to <a class=css data-link-type=maybe 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),
534534
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.
535535
Note, though, that <a class=css data-link-type=maybe href=http://dev.w3.org/csswg/css-values-3/#calc>calc()</a> can be used to validly achieve the same thing, like so:
536536

@@ -559,7 +559,7 @@ <h2 data-level=3 id=using-variables><span class=secno>3 </span><span class=conte
559559
(the initial value for <a class=property data-link-type=propdesc href=http://dev.w3.org/csswg/css-backgrounds-4/#background-color title=background-color>background-color</a>)
560560
instead.
561561

562-
<p> If the property was one that's inherited by default,
562+
<p> If the property was one thats inherited by default,
563563
such as <a class=property data-link-type=propdesc href=http://dev.w3.org/csswg/css-color-3/#color0 title=color>color</a>,
564564
it would compute to the inherited value
565565
rather than the initial value.
@@ -584,7 +584,7 @@ <h3 data-level=3.1 id=invalid-variables><span class=secno>3.1 </span><span class
584584
is invalid.
585585
When this happens,
586586
the computed value of the property is either
587-
the property's inherited value
587+
the propertys inherited value
588588
or its initial value
589589
depending on whether the property is inherited or not, respectively.
590590

@@ -608,9 +608,9 @@ <h3 data-level=3.1 id=invalid-variables><span class=secno>3.1 </span><span class
608608
</div>
609609

610610
<p class=note> Note: The <a href=#invalid-at-computed-value-time>invalid at computed-value time</a> concept exists
611-
because variables can't "fail early" like other syntax errors can,
611+
because variables cant "fail early" like other syntax errors can,
612612
so by the time the user agent realizes a property value is invalid,
613-
it's already thrown away the other cascaded values.
613+
its already thrown away the other cascaded values.
614614

615615
<!--
616616
AAA PPPPPPPPPPPPPPPPP IIIIIIIIII
@@ -769,7 +769,7 @@ <h4 data-level=4.2.1 id=cssvariablesmap-methods><span class=secno>4.2.1 </span><
769769
<tr>
770770
<td><code>el.style.varFoo</code>
771771
<td>n/a
772-
<td>Custom properties don't exist directly on "style"
772+
<td>Custom properties dont exist directly on "style"
773773
<tr>
774774
<td><code>el.style.varBar</code>
775775
<td>n/a
@@ -931,7 +931,7 @@ <h3 class=no-ref id=testing><span class=content>
931931
Working Group.
932932

933933
<p>Further information on submitting testcases and implementation reports
934-
can be found from on the CSS Working Group's website at
934+
can be found from on the CSS Working Groups website at
935935
<a href=http://www.w3.org/Style/CSS/Test/>http://www.w3.org/Style/CSS/Test/</a>.
936936
Questions should be directed to the
937937
<a href=http://lists.w3.org/Archives/Public/public-css-testsuite>public-css-testsuite@w3.org</a>

0 commit comments

Comments
 (0)