Skip to content

Commit f9a9b51

Browse files
committed
[css-variables] Fix the issues about css-wide keywords and the 'all' property.
--HG-- extra : rebase_source : 6477c35fe5164501c8dc3d3ed049b06e8b69b2f9
1 parent af9dabd commit f9a9b51

2 files changed

Lines changed: 22 additions & 30 deletions

File tree

css-variables/Overview.html

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
</a></p>
1313
<h1 class="p-name no-ref" id=title>CSS Custom Properties for Cascading Variables Module Level 1</h1>
1414
<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=20130825>25 August 2013</span></span></span></h2>
15+
<span class=dt-updated><span class=value-title title=20130826>26 August 2013</span></span></span></h2>
1616
<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>
1717
<dt>Feedback:</dt>
1818
<dd><a href="mailto:www-style@w3.org?subject=%5Bcss-variables%5D%20feedback">www-style@w3.org</a>
@@ -152,20 +152,6 @@ <h2 data-level=2 id=defining-variables><span class=secno>2 </span><span class=co
152152
such that they just never animate,
153153
not even with the "just flip at 50% progress" like everything else?
154154

155-
<p class=issue>
156-
Should the global values initial/inherit/default be interpreted?
157-
I'm guessing no,
158-
because we're not meant to interpret *anything*.
159-
You can get switch it back to inheriting by setting it to a guaranteed-invalid value,
160-
like <span class=css data-link-type=maybe title=var-foo>var-foo: var(foo);</span>,
161-
but you can't get <span class=css data-link-type=maybe>default</span> behavior.
162-
163-
<p class=issue>
164-
What's the relationship of custom properties and the <a class=property data-link-type=propdesc href=http://dev.w3.org/csswg/css-cascade-3/#propdef-all title=all>all</a> property?
165-
Does it reset all the variables?
166-
If <span class=css data-link-type=maybe title=var-foo>var-foo: initial;</span> isn't interpreted by CSS,
167-
what effect does <a class=css data-link-type=maybe href=http://dev.w3.org/csswg/css-cascade-3/#propdef-all title=all>all: initial;</a> have?
168-
169155
<p> A <dfn data-dfn-type=dfn data-noexport="" id=custom-property>custom property</dfn> is any property
170156
whose name starts with "var-",
171157
and contains at least one additional character.
@@ -218,6 +204,16 @@ <h2 data-level=2 id=defining-variables><span class=secno>2 </span><span class=co
218204
while using <span class=css data-link-type=maybe>var(FOO)</span> will refer to the second.
219205
</div>
220206

207+
<p> Custom properties are <strong>not</strong> reset by the <a class=property data-link-type=propdesc href=http://dev.w3.org/csswg/css-cascade-3/#propdef-all title=all>all</a> property.
208+
<span class=note>We may define a <a class=property data-link-type=propdesc title=var>var</a> property in the future that resets all variables.</span>
209+
210+
<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,
211+
with the same meaning as in any another property.
212+
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,
215+
and thus are not substituted in by the corresponding variable.
216+
221217
<h3 data-level=2.1 id=syntax><span class=secno>2.1 </span><span class=content>
222218
Custom Property Value Syntax</span><a class=section-link href=#syntax>§</a></h3>
223219

css-variables/Overview.src.html

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ <h1>CSS Custom Properties for Cascading Variables Module Level 1</h1>
1010
Previous Version: http://www.w3.org/TR/2012/WD-css-variables-20120410/
1111
Editor: Tab Atkins Jr., Google, http://xanthir.com/contact
1212
Abstract: This module introduces cascading variables as a new primitive value type that is accepted by all CSS properties, and custom properties for defining them.
13-
Ignored Terms: var-0, var-foo, var-main-color, var-Bar, var-two, var-header-color, var-accent-background, var-foo-bar, var-bar, var-one, <ident>
13+
Ignored Terms: var-0, var-foo, var-main-color, var-Bar, var-two, var-header-color, var-accent-background, var-foo-bar, var-bar, var-one, var, <ident>
1414
</pre>
1515

1616
<h2>
@@ -81,20 +81,6 @@ <h2 id='defining-variables'>
8181
such that they just never animate,
8282
not even with the "just flip at 50% progress" like everything else?
8383

84-
<p class='issue'>
85-
Should the global values initial/inherit/default be interpreted?
86-
I'm guessing no,
87-
because we're not meant to interpret *anything*.
88-
You can get switch it back to inheriting by setting it to a guaranteed-invalid value,
89-
like ''var-foo: var(foo);'',
90-
but you can't get ''default'' behavior.
91-
92-
<p class='issue'>
93-
What's the relationship of custom properties and the 'all' property?
94-
Does it reset all the variables?
95-
If ''var-foo: initial;'' isn't interpreted by CSS,
96-
what effect does ''all: initial;'' have?
97-
9884
A <dfn>custom property</dfn> is any property
9985
whose name starts with "var-",
10086
and contains at least one additional character.
@@ -149,6 +135,16 @@ <h2 id='defining-variables'>
149135
while using ''var(FOO)'' will refer to the second.
150136
</div>
151137

138+
Custom properties are <strong>not</strong> reset by the 'all' property.
139+
<span class='note'>We may define a 'var' property in the future that resets all variables.</span>
140+
141+
The <a spec=css-values>CSS-wide keywords</a> can be used in custom properties,
142+
with the same meaning as in any another property.
143+
144+
Note: That is, they're interpreted at cascaded-value time as normal,
145+
and are not preserved as the custom property's value,
146+
and thus are not substituted in by the corresponding variable.
147+
152148
<h3 id='syntax'>
153149
Custom Property Value Syntax</h3>
154150

0 commit comments

Comments
 (0)