Skip to content

Commit 1bc05eb

Browse files
committed
[css-variables] Finish the commit from earlier, adding a clarifying example to how case-sensitivity of the var-* properties works.
--HG-- extra : rebase_source : 1cf5766946582e869c250b1151684e63e8af1c5d
1 parent 3a462d2 commit 1bc05eb

2 files changed

Lines changed: 14 additions & 16 deletions

File tree

css-variables/Overview.html

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -304,13 +304,13 @@ <h2 id=defining-variables><span class=secno>2. </span> Defining Custom
304304
be written in lower-case.
305305

306306
<div class=example> For example, ‘<code class=css>VAR-FOO</code>’ is
307-
invalid, For example, ‘<code class=css>var-foo</code>’ and ‘<code
308-
class=css>VAR-foo</code>are treated as the same property, because the
309-
CSS-defined part of the name (the "var-" prefix) is matched
310-
case-insensitively, consistent with the rest of CSS. However, ‘<code
311-
class=css>var-foo</code>’ and <code class=css>var-FOO</code>are
312-
treated as different properties, because the author-defined part of the
313-
name is matched case-sensitively.</div>
307+
invalid, because the prefix isn't "var-".
308+
<p> While both ‘<code class=css>var-foo</code>and ‘<code
309+
class=css>var-FOO</code>’ are valid, they are distinct properties -
310+
using ‘<code class=css>var(foo)</code>’ will refer to the first one,
311+
while using <code class=css>var(FOO)</code>will refer to the
312+
second.
313+
</div>
314314

315315
<p> <a href="#custom-property"><i>Custom properties</i></a> have an
316316
extremely permissive value grammar, defined as the "value" production in

css-variables/Overview.src.html

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -155,15 +155,13 @@ <h2 id="defining-variables">
155155

156156
<div class='example'>
157157
For example, ''VAR-FOO'' is invalid,
158-
159-
For example, ''var-foo'' and ''VAR-foo'' are treated as the same property,
160-
because the CSS-defined part of the name
161-
(the "var-" prefix)
162-
is matched case-insensitively,
163-
consistent with the rest of CSS.
164-
However, ''var-foo'' and ''var-FOO'' are treated as different properties,
165-
because the author-defined part of the name
166-
is matched case-sensitively.
158+
because the prefix isn't "var-".
159+
160+
<p>
161+
While both ''var-foo'' and ''var-FOO'' are valid,
162+
they are distinct properties -
163+
using ''var(foo)'' will refer to the first one,
164+
while using ''var(FOO)'' will refer to the second.
167165
</div>
168166

169167
<p>

0 commit comments

Comments
 (0)