Skip to content

Commit 344dba0

Browse files
committed
[css-variables-1] Additional example w3c#7131
1 parent 6c74c2d commit 344dba0

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

css-variables-1/Overview.bs

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,33 @@ Defining Custom Properties: the '--*' family of properties</h2>
182182
to ensure that similar appearing sequences are identical.
183183
See Section 2.3 in [[CHARMOD-NORM]] for examples.
184184

185+
<div class="example">
186+
Developers maintaining the following CSS
187+
might be confused why the test patch is red:
188+
189+
<pre>
190+
--fijord: red;
191+
--fijord: green;
192+
--fijord: blue;
193+
194+
.test {
195+
background-color: var(--fijord);
196+
}
197+
198+
The reason is that the first custom property
199+
uses the character sequence
200+
LATIN SMALL LETTER F + LATIN SMALL LETTER I + LATIN SMALL LETTER J;
201+
the second, identical-looking one
202+
uses the character sequence
203+
LATIN SMALL LETTER F + LATIN SMALL LIGATURE IJ
204+
while the third
205+
uses the character sequence
206+
LATIN SMALL LIGATURE FI + LATIN SMALL LETTER J.
207+
208+
So the CSS contains three distinct custom properties,
209+
two of which are unused.
210+
</div>
211+
185212
Custom properties are <strong>not</strong> reset by the 'all' property.
186213
<span class='note'>We may define a property in the future that resets all variables.</span>
187214

0 commit comments

Comments
 (0)