Skip to content

Commit 320541b

Browse files
committed
[css-variables-1][editorial] Add a little more context to the case-sensitivity note.
1 parent 1de4f91 commit 320541b

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

css-variables-1/Overview.bs

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,10 +137,21 @@ Defining Custom Properties: the '--*' family of properties</h2>
137137
if they are [=identical to=] each other.
138138

139139
<div class='example'>
140-
While both '--foo' and --FOO are valid,
141-
they are distinct properties -
140+
While both '--foo' and '--FOO' are valid,
141+
they are distinct properties --
142142
using ''var(--foo)'' will refer to the first one,
143143
while using ''var(--FOO)'' will refer to the second.
144+
145+
Perhaps more surprisingly,
146+
<css>--fo&#x00f3;</css> and <css>--foo&#x0301;</css> are distinct properties.
147+
The first is spelled with U+00F3 (LATIN SMALL LETTER O WITH ACUTE)
148+
while the second is spelled with an ASCII "o" followed by U+0301 (COMBINING ACUTE ACCENT),
149+
and the "[=identical to=]" relation uses direct codepoint-by-codepoint comparison
150+
to determine if two strings are equal,
151+
to avoid the complexities and pitfalls of unicode normalization and locale-specific collation.
152+
153+
Different OSes or input methods can sometimes output visually-identical text with different codepoints,
154+
so authors should be aware of this potential hazard.
144155
</div>
145156

146157
Custom properties are <strong>not</strong> reset by the 'all' property.

0 commit comments

Comments
 (0)