Skip to content

Commit ea9df78

Browse files
committed
[css-syntax] Fix cross-references for <{-token> and the like.
1 parent 7b5e9f4 commit ea9df78

2 files changed

Lines changed: 48 additions & 48 deletions

File tree

css-syntax/Overview.html

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -315,9 +315,9 @@ <h3 class="heading settled heading" data-level=2.2 id=error-handling><span class
315315
nothing is invalid from the parser’s standpoint;
316316
it’s all part of the at-rule’s prelude.
317317
Encountering a <a class="production css-code" data-link-type=type href=#typedef-semicolon-token title="<semicolon-token>">&lt;semicolon-token&gt;</a> ends the at-rule immediately,
318-
while encountering an opening curly-brace &lt;&lt;{-token&gt;&gt; starts the at-rule’s body.
318+
while encountering an opening curly-brace <a href=#tokendef-open-curly>&lt;{-token&gt;</a> starts the at-rule’s body.
319319
The at-rule seeks forward, matching blocks (content surrounded by (), {}, or [])
320-
until it finds a closing curly-brace &lt;&lt;}-token&gt;&gt; that isn’t matched by anything else
320+
until it finds a closing curly-brace <a href=#tokendef-close-curly>&lt;}-token&gt;</a> that isn’t matched by anything else
321321
or inside of another block.
322322
The contents of the at-rule are then interpreted according to the at-rule’s own grammar.
323323

@@ -1926,11 +1926,11 @@ <h4 class="heading settled heading" data-level=4.3.1 id=consume-a-token><span cl
19261926

19271927
<dt>U+0028 LEFT PARENTHESIS (()
19281928
<dd>
1929-
Return a &lt;&lt;(-token&gt;&gt;.
1929+
Return a <a href=#tokendef-open-paren>&lt;(-token&gt;</a>.
19301930

19311931
<dt>U+0029 RIGHT PARENTHESIS ())
19321932
<dd>
1933-
Return a &lt;&lt;)-token&gt;&gt;.
1933+
Return a <a href=#tokendef-close-paren>&lt;)-token&gt;</a>.
19341934

19351935
<dt>U+002A ASTERISK (*)
19361936
<dd>
@@ -2044,7 +2044,7 @@ <h4 class="heading settled heading" data-level=4.3.1 id=consume-a-token><span cl
20442044

20452045
<dt>U+005B LEFT SQUARE BRACKET ([)
20462046
<dd>
2047-
Return a &lt;&lt;[-token&gt;&gt;.
2047+
Return a <a href=#tokendef-open-square>&lt;[-token&gt;</a>.
20482048

20492049
<dt>U+005C REVERSE SOLIDUS (\)
20502050
<dd>
@@ -2060,7 +2060,7 @@ <h4 class="heading settled heading" data-level=4.3.1 id=consume-a-token><span cl
20602060

20612061
<dt>U+005D RIGHT SQUARE BRACKET (])
20622062
<dd>
2063-
Return a &lt;&lt;]-token&gt;&gt;.
2063+
Return a <a href=#tokendef-close-square>&lt;]-token&gt;</a>.
20642064

20652065
<dt>U+005E CIRCUMFLEX ACCENT (^)
20662066
<dd>
@@ -2075,11 +2075,11 @@ <h4 class="heading settled heading" data-level=4.3.1 id=consume-a-token><span cl
20752075

20762076
<dt>U+007B LEFT CURLY BRACKET ({)
20772077
<dd>
2078-
Return a &lt;&lt;{-token&gt;&gt;.
2078+
Return a <a href=#tokendef-open-curly>&lt;{-token&gt;</a>.
20792079

20802080
<dt>U+007D RIGHT CURLY BRACKET (})
20812081
<dd>
2082-
Return a &lt;&lt;}-token&gt;&gt;.
2082+
Return a <a href=#tokendef-close-curly>&lt;}-token&gt;</a>.
20832083

20842084
<dt><a data-link-type=dfn href=#digit title=digit>digit</a>
20852085
<dd>
@@ -2805,15 +2805,15 @@ <h2 class="heading settled heading" data-level=5 id=parsing><span class=secno>5
28052805
<dd>
28062806
Any token produced by the tokenizer
28072807
except for <a class="production css-code" data-link-type=type href=#typedef-function-token title="<function-token>">&lt;function-token&gt;</a>s,
2808-
&lt;&lt;{-token&gt;&gt;s,
2809-
&lt;&lt;(-token&gt;&gt;s,
2810-
and &lt;&lt;[-token&gt;&gt;s.
2808+
<a href=#tokendef-open-curly>&lt;{-token&gt;</a>s,
2809+
<a href=#tokendef-open-paren>&lt;(-token&gt;</a>s,
2810+
and <a href=#tokendef-open-square>&lt;[-token&gt;</a>s.
28112811

28122812
<p class=note> Note: The non-preserved tokens listed above are always consumed into higher-level objects,
28132813
either functions or simple blocks,
28142814
and so never appear in any parser output themselves.
28152815

2816-
<p class=note> Note: The tokens &lt;&lt;}-token&gt;&gt;s, &lt;&lt;)-token&gt;&gt;s, &lt;&lt;]-token&gt;&gt;, <a class="production css-code" data-link-type=type href=#typedef-bad-string-token title="<bad-string-token>">&lt;bad-string-token&gt;</a>, and <a class="production css-code" data-link-type=type href=#typedef-bad-url-token title="<bad-url-token>">&lt;bad-url-token&gt;</a> are always parse errors,
2816+
<p class=note> Note: The tokens <a href=#tokendef-close-curly>&lt;}-token&gt;</a>s, <a href=#tokendef-close-paren>&lt;)-token&gt;</a>s, <a href=#tokendef-close-square>&lt;]-token&gt;</a>, <a class="production css-code" data-link-type=type href=#typedef-bad-string-token title="<bad-string-token>">&lt;bad-string-token&gt;</a>, and <a class="production css-code" data-link-type=type href=#typedef-bad-url-token title="<bad-url-token>">&lt;bad-url-token&gt;</a> are always parse errors,
28172817
but they are preserved in the token stream by this specification to allow other specs,
28182818
such as Media Queries,
28192819
to define more fine-grainted error-handling
@@ -2826,7 +2826,7 @@ <h2 class="heading settled heading" data-level=5 id=parsing><span class=secno>5
28262826

28272827
<dt><dfn data-dfn-type=dfn data-noexport="" id=simple-block>simple block<a class=self-link href=#simple-block></a></dfn>
28282828
<dd>
2829-
A simple block has an associated token (either a &lt;&lt;[-token&gt;&gt;, &lt;&lt;(-token&gt;&gt;, or &lt;&lt;{-token&gt;&gt;)
2829+
A simple block has an associated token (either a <a href=#tokendef-open-square>&lt;[-token&gt;</a>, <a href=#tokendef-open-paren>&lt;(-token&gt;</a>, or <a href=#tokendef-open-curly>&lt;{-token&gt;</a>)
28302830
and a value consisting of a list of component values.
28312831
</dl>
28322832

@@ -3801,13 +3801,13 @@ <h4 class="heading settled heading" data-level=5.4.2 id=consume-an-at-rule><span
38013801
<dd>
38023802
Return the at-rule.
38033803

3804-
<dt>&lt;&lt;{-token&gt;&gt;
3804+
<dt><a href=#tokendef-open-curly>&lt;{-token&gt;</a>
38053805
<dd>
38063806
<a data-link-type=dfn href=#consume-a-simple-block0 title="consume a simple block">Consume a simple block</a>
38073807
and assign it to the at-rule’s block.
38083808
Return the at-rule.
38093809

3810-
<dt><a data-link-type=dfn href=#simple-block title="simple block">simple block</a> with an associated token of &lt;&lt;{-token&gt;&gt;
3810+
<dt><a data-link-type=dfn href=#simple-block title="simple block">simple block</a> with an associated token of <a href=#tokendef-open-curly>&lt;{-token&gt;</a>
38113811
<dd>
38123812
Assign the block to the at-rule’s block.
38133813
Return the at-rule.
@@ -3837,13 +3837,13 @@ <h4 class="heading settled heading" data-level=5.4.3 id=consume-a-qualified-rule
38373837
This is a <a data-link-type=dfn href=#parse-error title="parse error">parse error</a>.
38383838
Return nothing.
38393839

3840-
<dt>&lt;&lt;{-token&gt;&gt;
3840+
<dt><a href=#tokendef-open-curly>&lt;{-token&gt;</a>
38413841
<dd>
38423842
<a data-link-type=dfn href=#consume-a-simple-block0 title="consume a simple block">Consume a simple block</a>
38433843
and assign it to the qualified rule’s block.
38443844
Return the qualified rule.
38453845

3846-
<dt><a data-link-type=dfn href=#simple-block title="simple block">simple block</a> with an associated token of &lt;&lt;{-token&gt;&gt;
3846+
<dt><a data-link-type=dfn href=#simple-block title="simple block">simple block</a> with an associated token of <a href=#tokendef-open-curly>&lt;{-token&gt;</a>
38473847
<dd>
38483848
Assign the block to the qualified rule’s block.
38493849
Return the qualified rule.
@@ -3948,7 +3948,7 @@ <h4 class="heading settled heading" data-level=5.4.6 id=consume-a-component-valu
39483948
<p> <a data-link-type=dfn href=#consume-the-next-input-token title="consume the next input token">Consume the next input token</a>.
39493949

39503950
<p> If the <a data-link-type=dfn href=#current-input-token title="current input token">current input token</a>
3951-
is a &lt;&lt;{-token&gt;&gt;, &lt;&lt;[-token&gt;&gt;, or &lt;&lt;(-token&gt;&gt;,
3951+
is a <a href=#tokendef-open-curly>&lt;{-token&gt;</a>, <a href=#tokendef-open-square>&lt;[-token&gt;</a>, or <a href=#tokendef-open-paren>&lt;(-token&gt;</a>,
39523952
<a data-link-type=dfn href=#consume-a-simple-block0 title="consume a simple block">consume a simple block</a>
39533953
and return it.
39543954

@@ -3966,7 +3966,7 @@ <h4 class="heading settled heading" data-level=5.4.7 id=consume-a-simple-block><
39663966
<p> To <dfn data-dfn-type=dfn data-noexport="" id=consume-a-simple-block0>consume a simple block<a class=self-link href=#consume-a-simple-block0></a></dfn>:
39673967

39683968
<p> The <dfn data-dfn-type=dfn data-noexport="" id=ending-token>ending token<a class=self-link href=#ending-token></a></dfn> is the mirror variant of the <a data-link-type=dfn href=#current-input-token title="current input token">current input token</a>.
3969-
(E.g. if it was called with &lt;&lt;[-token&gt;&gt;, the <a data-link-type=dfn href=#ending-token title="ending token">ending token</a> is &lt;&lt;]-token&gt;&gt;.)
3969+
(E.g. if it was called with <a href=#tokendef-open-square>&lt;[-token&gt;</a>, the <a data-link-type=dfn href=#ending-token title="ending token">ending token</a> is <a href=#tokendef-close-square>&lt;]-token&gt;</a>.)
39703970

39713971
<p> Create a <a data-link-type=dfn href=#simple-block title="simple block">simple block</a> with its associated token set to the <a data-link-type=dfn href=#current-input-token title="current input token">current input token</a>
39723972
and with a value with is initially an empty list.
@@ -3999,7 +3999,7 @@ <h4 class="heading settled heading" data-level=5.4.8 id=consume-a-function><span
39993999

40004000
<dl>
40014001
<dt><a class="production css-code" data-link-type=type href=#typedef-eof-token title="<eof-token>">&lt;EOF-token&gt;</a>
4002-
<dt>&lt;&lt;)-token&gt;&gt;
4002+
<dt><a href=#tokendef-close-paren>&lt;)-token&gt;</a>
40034003
<dd>
40044004
Return the function.
40054005

@@ -4228,7 +4228,7 @@ <h2 class="heading settled heading" data-level=7 id=rule-defs><span class=secno>
42284228
<li><a class="production css-code" data-link-type=type href=#typedef-ident-token title="<ident-token>">&lt;ident-token&gt;</a>s (such as <span class=css data-link-type=maybe title=auto>auto</span>, <span class=css data-link-type=maybe title=disc>disc</span>, etc), which are simply written as their value.
42294229
<li><a class="production css-code" data-link-type=type href=#typedef-at-keyword-token title="<at-keyword-token>">&lt;at-keyword-token&gt;</a>s, which are written as an @ character followed by the token’s value, like "@media".
42304230
<li><a class="production css-code" data-link-type=type href=#typedef-function-token title="<function-token>">&lt;function-token&gt;</a>s, which are written as the function name followed by a ( character, like "translate(".
4231-
<li>The <a class="production css-code" data-link-type=type href=#typedef-colon-token title="<colon-token>">&lt;colon-token&gt;</a> (written as <code>:</code>), <a class="production css-code" data-link-type=type href=#typedef-comma-token title="<comma-token>">&lt;comma-token&gt;</a> (written as <code>,</code>), <a class="production css-code" data-link-type=type href=#typedef-semicolon-token title="<semicolon-token>">&lt;semicolon-token&gt;</a> (written as <code>;</code>), &lt;&lt;(-token&gt;&gt;, &lt;&lt;)-token&gt;&gt;, &lt;&lt;{-token&gt;&gt;, and &lt;&lt;}-token&gt;&gt;s.
4231+
<li>The <a class="production css-code" data-link-type=type href=#typedef-colon-token title="<colon-token>">&lt;colon-token&gt;</a> (written as <code>:</code>), <a class="production css-code" data-link-type=type href=#typedef-comma-token title="<comma-token>">&lt;comma-token&gt;</a> (written as <code>,</code>), <a class="production css-code" data-link-type=type href=#typedef-semicolon-token title="<semicolon-token>">&lt;semicolon-token&gt;</a> (written as <code>;</code>), <a href=#tokendef-open-paren>&lt;(-token&gt;</a>, <a href=#tokendef-close-paren>&lt;)-token&gt;</a>, <a href=#tokendef-open-curly>&lt;{-token&gt;</a>, and <a href=#tokendef-close-curly>&lt;}-token&gt;</a>s.
42324232
</ul>
42334233

42344234
<p> Tokens match if their value is an <a data-link-type=dfn href=#ascii-case-insensitive title="ascii case-insensitive">ASCII case-insensitive</a> match
@@ -4242,7 +4242,7 @@ <h2 class="heading settled heading" data-level=7 id=rule-defs><span class=secno>
42424242

42434243
<a class="production css-code" data-link-type=type href=#typedef-delim-token title="<delim-token>">&lt;delim-token&gt;</a>s are written with their value enclosed in single quotes.
42444244
For example, a <a class="production css-code" data-link-type=type href=#typedef-delim-token title="<delim-token>">&lt;delim-token&gt;</a> containing the "+" <a data-link-type=dfn href=#code-point title="code point">code point</a> is written as <code>'+'</code>.
4245-
Similarly, the &lt;&lt;[-token&gt;&gt; and &lt;&lt;]-token&gt;&gt;s must be written in single quotes,
4245+
Similarly, the <a href=#tokendef-open-square>&lt;[-token&gt;</a> and <a href=#tokendef-close-square>&lt;]-token&gt;</a>s must be written in single quotes,
42464246
as they’re used by the syntax of the grammar itself to group clauses.
42474247
<a class="production css-code" data-link-type=type href=#typedef-whitespace-token title="<whitespace-token>">&lt;whitespace-token&gt;</a> is never indicated in the grammar;
42484248
<a class="production css-code" data-link-type=type href=#typedef-whitespace-token title="<whitespace-token>">&lt;whitespace-token&gt;</a>s are allowed before, after, and between any two tokens,
@@ -4469,7 +4469,7 @@ <h2 class="heading settled heading" data-level=9 id=serialization><span class=se
44694469
a <a class="production css-code" data-link-type=type href=#typedef-number-token title="<number-token>">&lt;number-token&gt;</a>, <a class="production css-code" data-link-type=type href=#typedef-ident-token title="<ident-token>">&lt;ident-token&gt;</a>, or <a class="production css-code" data-link-type=type href=#typedef-dimension-token title="<dimension-token>">&lt;dimension-token&gt;</a> followed by a <a class="production css-code" data-link-type=type href=#typedef-percentage-token title="<percentage-token>">&lt;percentage-token&gt;</a>, <a class="production css-code" data-link-type=type href=#typedef-unicode-range-token title="<unicode-range-token>">&lt;unicode-range-token&gt;</a>, <a class="production css-code" data-link-type=type href=#typedef-url-token title="<url-token>">&lt;url-token&gt;</a>, or <a class="production css-code" data-link-type=type href=#typedef-function-token title="<function-token>">&lt;function-token&gt;</a>;
44704470

44714471
<li>
4472-
an <a class="production css-code" data-link-type=type href=#typedef-ident-token title="<ident-token>">&lt;ident-token&gt;</a> followed by a &lt;&lt;(-token&gt;&gt;;
4472+
an <a class="production css-code" data-link-type=type href=#typedef-ident-token title="<ident-token>">&lt;ident-token&gt;</a> followed by a <a href=#tokendef-open-paren>&lt;(-token&gt;</a>;
44734473

44744474
<li>
44754475
a <a class="production css-code" data-link-type=type href=#typedef-delim-token title="<delim-token>">&lt;delim-token&gt;</a> containing "#" or "@" followed by any token except <a class="production css-code" data-link-type=type href=#typedef-whitespace-token title="<whitespace-token>">&lt;whitespace-token&gt;</a>;
@@ -4643,7 +4643,7 @@ <h3 class="heading settled heading" data-level=10.2 id=changes-css21><span class
46434643

46444644
<li>
46454645
The handling of some miscellanous "special" tokens
4646-
(like an unmatched &lt;&lt;}-token&gt;&gt;)
4646+
(like an unmatched <a href=#tokendef-close-curly>&lt;}-token&gt;</a>)
46474647
showing up in various places in the grammar
46484648
has been specified with some reasonable behavior shown by at least one browser.
46494649
Previously, stylesheets with those tokens in those places just didn’t match the stylesheet grammar at all,

0 commit comments

Comments
 (0)