Skip to content

Commit 029fd3f

Browse files
committed
[css-variables] Try again with the last commit?
1 parent 3f849da commit 029fd3f

2 files changed

Lines changed: 22 additions & 6 deletions

File tree

css-variables/Overview.html

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ <h2 id=defining-variables><span class=secno>2. </span> Defining Custom
329329
project.
330330
</div>
331331

332-
<p> Unlike other CSS properties, custom properties are
332+
<p> Unlike other CSS properties, custom property names are
333333
<strong>case-sensitive</strong>. The "var-" prefix <strong>must</strong>
334334
be written in lower-case.
335335

@@ -357,11 +357,17 @@ <h2 id=defining-variables><span class=secno>2. </span> Defining Custom
357357
it will end the property), a "!important" that's not at the end, or
358358
invalid tokens (such as BAD_STRING and BAD_URL).
359359

360-
<p> Note: Custom properties can contain a trailing ‘<code
360+
<p class=note> Custom properties can contain a trailing ‘<code
361361
class=css>!important</code>’, but this is automatically removed from the
362362
property's value by the CSS parser, and makes the custom property
363363
"important" in the CSS cascade.
364364

365+
<p> Further, the value of a custom property must retain its original
366+
author-given casing, unlike most CSS values which can be safely
367+
lower-cased (because most of CSS is case-insensitive in the ASCII range).
368+
(This requirement does not apply when a custom property's value is
369+
substituted into another property via a variable.)
370+
365371
<div class=example> For example, the following is a valid custom property:
366372
<pre>var-foo: if(x &gt; 5) this.width = 10;
367373
</pre>

css-variables/Overview.src.html

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ <h2 id='defining-variables'>
105105
</div>
106106

107107
Unlike other CSS properties,
108-
custom properties are <strong>case-sensitive</strong>.
108+
custom property names are <strong>case-sensitive</strong>.
109109
The "var-" prefix <strong>must</strong> be written in lower-case.
110110

111111
<div class='example'>
@@ -130,9 +130,17 @@ <h2 id='defining-variables'>
130130
a "!important" that's not at the end,
131131
or invalid tokens (such as BAD_STRING and BAD_URL).
132132

133-
Note: Custom properties can contain a trailing ''!important'',
134-
but this is automatically removed from the property's value by the CSS parser,
135-
and makes the custom property "important" in the CSS cascade.
133+
<p class='note'>
134+
Custom properties can contain a trailing ''!important'',
135+
but this is automatically removed from the property's value by the CSS parser,
136+
and makes the custom property "important" in the CSS cascade.
137+
138+
Further, the value of a custom property must retain its original author-given casing,
139+
unlike most CSS values which can be safely lower-cased
140+
(because most of CSS is case-insensitive in the ASCII range).
141+
(This requirement does not apply when a custom property's value
142+
is substituted into another property
143+
via a variable.)
136144

137145
<div class='example'>
138146
For example, the following is a valid custom property:
@@ -537,6 +545,8 @@ <h3 id='the-cssstyledeclaration-interface'>
537545
}
538546
</pre>
539547

548+
549+
540550
<h4 id='serializing-custom-props'>
541551
Serializing Custom Properties</h4>
542552

0 commit comments

Comments
 (0)