Skip to content

Commit 22a31fe

Browse files
committed
[css-syntax] Literal tokens in grammars are ASCII case-insensitive.
1 parent 9a51e4a commit 22a31fe

2 files changed

Lines changed: 23 additions & 4 deletions

File tree

css-syntax/Overview.html

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2592,12 +2592,21 @@ <h2 data-level=7 id=rule-defs><span class=secno>7 </span><span class=content>
25922592
<p> Several types of tokens are written literally, without quotes:
25932593

25942594
<p> <ul>
2595-
<li>Ident〉s (such as <span class=css data-autolink=maybe>auto</span>, <span class=css data-autolink=maybe>disc</span>, etc.)
2596-
<li>〈at-keyword〉s, which are written as an @ character followed by the token's name, like "@media".
2595+
<li>ident〉s (such as <span class=css data-autolink=maybe>auto</span>, <span class=css data-autolink=maybe>disc</span>, etc), which are simply written as their value.
2596+
<li>〈at-keyword〉s, which are written as an @ character followed by the token's value, like "@media".
25972597
<li>〈function〉s, which are written as the function name followed by a ( character, like "translate(".
25982598
<li>The 〈colon〉 (written as <code>:</code>), 〈comma〉 (written as <code>,</code>), 〈semicolon〉 (written as <code>;</code>), 〈(〉, 〈)〉, 〈{〉, and 〈}〉s.
25992599
</ul>
26002600

2601+
<p> Tokens match if their value is an <a href=#ascii-case-insensitive>ASCII case-insensitive</a> match
2602+
for the value defined in the grammar.
2603+
2604+
<p class=note>
2605+
Although it is possible, with <a href=#escaping0>escaping</a>,
2606+
to construct an 〈ident〉 whose value starts with <code>@</code> or ends with <code>(</code>,
2607+
such a tokens is not an 〈at-keyword〉 or a 〈function〉
2608+
and does not match corresponding grammar definitions.
2609+
26012610
<p> 〈delim〉s are written with their value enclosed in single quotes.
26022611
For example, a 〈delim〉 containing the "+" character is written as <code>'+'</code>.
26032612
Similarly, the 〈[〉 and 〈]〉s must be written in single quotes,
@@ -3208,6 +3217,7 @@ <h2 class="no-num no-ref" id=index><span class=content>
32083217
<li>end of the range, <a href=#end-of-the-range title="section 4.3.15">4.3.15</a>
32093218
<li>〈EOF〉, <a href=#eof title="section 5.2">5.2</a>
32103219
<li>EOF character, <a href=#eof-character title="section 4.2">4.2</a>
3220+
<li>escaping, <a href=#escaping0 title="section 2.1">2.1</a>
32113221
<li>function, <a href=#function title="section 5">5</a>
32123222
<li>get an encoding, <a href=#get-an-encoding title="section 3.2">3.2</a>
32133223
<li>hex digit, <a href=#hex-digit title="section 4.2">4.2</a>

css-syntax/Overview.src.html

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2473,12 +2473,21 @@ <h2 id='rule-defs'>
24732473
Several types of tokens are written literally, without quotes:
24742474

24752475
<ul>
2476-
<li>Ident〉s (such as ''auto'', ''disc'', etc.)
2477-
<li>〈at-keyword〉s, which are written as an @ character followed by the token's name, like "@media".
2476+
<li>ident〉s (such as ''auto'', ''disc'', etc), which are simply written as their value.
2477+
<li>〈at-keyword〉s, which are written as an @ character followed by the token's value, like "@media".
24782478
<li>〈function〉s, which are written as the function name followed by a ( character, like "translate(".
24792479
<li>The 〈colon〉 (written as <code>:</code>), 〈comma〉 (written as <code>,</code>), 〈semicolon〉 (written as <code>;</code>), 〈(〉, 〈)〉, 〈{〉, and 〈}〉s.
24802480
</ul>
24812481

2482+
Tokens match if their value is an <a>ASCII case-insensitive</a> match
2483+
for the value defined in the grammar.
2484+
2485+
<p class=note>
2486+
Although it is possible, with <a>escaping</a>,
2487+
to construct an 〈ident〉 whose value starts with <code>@</code> or ends with <code>(</code>,
2488+
such a tokens is not an 〈at-keyword〉 or a 〈function〉
2489+
and does not match corresponding grammar definitions.
2490+
24822491
〈delim〉s are written with their value enclosed in single quotes.
24832492
For example, a 〈delim〉 containing the "+" character is written as <code>'+'</code>.
24842493
Similarly, the 〈[〉 and 〈]〉s must be written in single quotes,

0 commit comments

Comments
 (0)