Skip to content

Commit 7b969e8

Browse files
committed
[css-syntax] Properly define "identifier".
1 parent 878a14c commit 7b969e8

2 files changed

Lines changed: 25 additions & 8 deletions

File tree

css-syntax/Overview.html

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ <h2 class="heading settled heading" data-level=2 id=syntax-description><span cla
243243
which are only applied when the <span class=css data-link-type=maybe title=@media>@media</span>s conditions are fulfilled.
244244
</div>
245245

246-
<p> Property names and <a data-link-type=dfn href=#at-rule title=at-rule>at-rule</a> names are always <b>identifiers</b>,
246+
<p> Property names and <a data-link-type=dfn href=#at-rule title=at-rule>at-rule</a> names are always <a data-link-type=dfn href=#identifier title=identifiers>identifiers</a>,
247247
which have to start with a letter or a hyphen followed by a letter,
248248
and then can contain letters, numbers, hyphens, or underscores.
249249
You can include any <a data-link-type=dfn href=#code-point title="code point">code point</a> at all,
@@ -259,7 +259,7 @@ <h3 class="heading settled heading" data-level=2.1 id=escaping><span class=secno
259259

260260
<p> <em>This section is not normative.</em>
261261

262-
<p> Any Unicode <a data-link-type=dfn href=#code-point title="code point">code point</a> can be included in an identifier or quoted string
262+
<p> Any Unicode <a data-link-type=dfn href=#code-point title="code point">code point</a> can be included in an <a data-link-type=dfn href=#identifier title=identifier>identifier</a> or quoted string
263263
by <dfn data-dfn-type=dfn data-noexport="" id=escaping0>escaping<a class=self-link href=#escaping0></a></dfn> it.
264264
CSS escape sequences start with a backslash (\), and continue with:
265265

@@ -275,7 +275,7 @@ <h3 class="heading settled heading" data-level=2.1 id=escaping><span class=secno
275275
to be followed by "real" hex digits.
276276

277277
<p class=example>
278-
An identifier with the value "&amp;B"
278+
An <a data-link-type=dfn href=#identifier title=identifier>identifier</a> with the value "&amp;B"
279279
could be written as <span class=css data-link-type=maybe title="\26 b">\26 B</span> or <span class=css data-link-type=maybe title=\000026b>\000026B</span>.
280280

281281
<p class=note>
@@ -1856,6 +1856,14 @@ <h3 class="heading settled heading" data-level=4.2 id=tokenizer-definitions><spa
18561856
<dt><dfn data-dfn-type=dfn data-noexport="" id=maximum-allowed-code-point>maximum allowed code point<a class=self-link href=#maximum-allowed-code-point></a></dfn>
18571857
<dd>The greatest <a data-link-type=dfn href=#code-point title="code point">code point</a> defined by Unicode. This is currently U+10FFFF.
18581858

1859+
<dt><dfn data-dfn-type=dfn data-noexport="" id=identifier>identifier<a class=self-link href=#identifier></a></dfn>
1860+
<dd>
1861+
A portion of the CSS source that has the same syntax as an <a class="production css-code" data-link-type=type href=#typedef-ident-token title="<ident-token>">&lt;ident-token&gt;</a>.
1862+
Also appears in <a class="production css-code" data-link-type=type href=#typedef-at-keyword-token title="<at-keyword-token>">&lt;at-keyword-token&gt;</a>,
1863+
<a class="production css-code" data-link-type=type href=#typedef-function-token title="<function-token>">&lt;function-token&gt;</a>,
1864+
<a class="production css-code" data-link-type=type href=#typedef-hash-token title="<hash-token>">&lt;hash-token&gt;</a> with the "id" type flag,
1865+
and the unit of <a class="production css-code" data-link-type=type href=#typedef-dimension-token title="<dimension-token>">&lt;dimension-token&gt;</a>.
1866+
18591867
</dl>
18601868

18611869
<h3 class="heading settled heading" data-level=4.3 id=tokenizer-algorithms><span class=secno>4.3 </span><span class=content>
@@ -2478,7 +2486,7 @@ <h4 class="heading settled heading" data-level=4.3.8 id=starts-with-a-valid-esca
24782486
<h4 class="heading settled heading" data-level=4.3.9 id=would-start-an-identifier><span class=secno>4.3.9 </span><span class=content>
24792487
Check if three code points would start an identifier</span><a class=self-link href=#would-start-an-identifier></a></h4>
24802488

2481-
<p> This section describes how to <dfn data-dfn-type=dfn data-noexport="" id=check-if-three-code-points-would-start-an-identifier title="check if three code points would start an identifier|starts with an identifier|start with an identifier|would start an identifier">check if three code points would start an identifier<a class=self-link href=#check-if-three-code-points-would-start-an-identifier></a></dfn>.
2489+
<p> This section describes how to <dfn data-dfn-type=dfn data-noexport="" id=check-if-three-code-points-would-start-an-identifier title="check if three code points would start an identifier|starts with an identifier|start with an identifier|would start an identifier">check if three code points would start an <a data-link-type=dfn href=#identifier title=identifier>identifier</a><a class=self-link href=#check-if-three-code-points-would-start-an-identifier></a></dfn>.
24822490
The algorithm described here can be called explicitly with three <a data-link-type=dfn href=#code-point title="code points">code points</a>,
24832491
or can be called with the input stream itself.
24842492
In the latter case, the three <a data-link-type=dfn href=#code-point title="code points">code points</a> in question are
@@ -4994,6 +5002,7 @@ <h2 class="no-num no-ref heading settled heading" id=index><span class=content>
49945002
<li>get an encoding, <a href=#get-an-encoding title="section 3.2">3.2</a>
49955003
<li>&lt;hash-token&gt;, <a href=#typedef-hash-token title="section 4">4</a>
49965004
<li>hex digit, <a href=#hex-digit title="section 4.2">4.2</a>
5005+
<li>identifier, <a href=#identifier title="section 4.2">4.2</a>
49975006
<li>&lt;ident-token&gt;, <a href=#typedef-ident-token title="section 4">4</a>
49985007
<li>&lt;include-match-token&gt;, <a href=#typedef-include-match-token title="section 4">4</a>
49995008
<li>&lt;integer&gt;, <a href=#typedef-integer title="section 6.2">6.2</a>

css-syntax/Overview.src.html

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ <h2 id='syntax-description'>
122122
which are only applied when the ''@media''s conditions are fulfilled.
123123
</div>
124124

125-
Property names and <a>at-rule</a> names are always <b>identifiers</b>,
125+
Property names and <a>at-rule</a> names are always <a>identifiers</a>,
126126
which have to start with a letter or a hyphen followed by a letter,
127127
and then can contain letters, numbers, hyphens, or underscores.
128128
You can include any <a>code point</a> at all,
@@ -138,7 +138,7 @@ <h3 id="escaping">
138138

139139
<em>This section is not normative.</em>
140140

141-
Any Unicode <a>code point</a> can be included in an identifier or quoted string
141+
Any Unicode <a>code point</a> can be included in an <a>identifier</a> or quoted string
142142
by <dfn>escaping</dfn> it.
143143
CSS escape sequences start with a backslash (\), and continue with:
144144

@@ -154,7 +154,7 @@ <h3 id="escaping">
154154
to be followed by "real" hex digits.
155155

156156
<p class=example>
157-
An identifier with the value "&B"
157+
An <a>identifier</a> with the value "&B"
158158
could be written as ''\26 B'' or ''\000026B''.
159159

160160
<p class=note>
@@ -821,6 +821,14 @@ <h3 id="tokenizer-definitions">
821821
<dt><dfn>maximum allowed code point</dfn>
822822
<dd>The greatest <a>code point</a> defined by Unicode. This is currently U+10FFFF.
823823

824+
<dt><dfn>identifier</dfn>
825+
<dd>
826+
A portion of the CSS source that has the same syntax as an <<ident-token>>.
827+
Also appears in <<at-keyword-token>>,
828+
<<function-token>>,
829+
<<hash-token>> with the "id" type flag,
830+
and the unit of <<dimension-token>>.
831+
824832
</dl>
825833

826834
<h3 id="tokenizer-algorithms">
@@ -1443,7 +1451,7 @@ <h4 id="starts-with-a-valid-escape">
14431451
<h4 id="would-start-an-identifier">
14441452
Check if three code points would start an identifier</dfn></h4>
14451453

1446-
This section describes how to <dfn title="check if three code points would start an identifier|starts with an identifier|start with an identifier|would start an identifier">check if three code points would start an identifier</dfn>.
1454+
This section describes how to <dfn title="check if three code points would start an identifier|starts with an identifier|start with an identifier|would start an identifier">check if three code points would start an <a>identifier</a></dfn>.
14471455
The algorithm described here can be called explicitly with three <a>code points</a>,
14481456
or can be called with the input stream itself.
14491457
In the latter case, the three <a>code points</a> in question are

0 commit comments

Comments
 (0)