Skip to content

Commit 8fe5c38

Browse files
committed
[css-syntax] Allow -- to start an ident-like token.
1 parent ecc7231 commit 8fe5c38

File tree

2 files changed

+91
-69
lines changed

2 files changed

+91
-69
lines changed

css-syntax/Overview.bs

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -555,11 +555,14 @@ Token Railroad Diagrams</h3>
555555
<dt id="ident-token-diagram"><<ident-token>>
556556
<dd>
557557
<pre class='railroad'>
558-
Opt: skip
559-
T: -
560-
Choice:
561-
N: a-z A-Z _ or non-ASCII
562-
N: escape
558+
Or: 1
559+
T: --
560+
Seq:
561+
Opt: skip
562+
T: -
563+
Or:
564+
N: a-z A-Z _ or non-ASCII
565+
N: escape
563566
Star:
564567
Or:
565568
N: a-z A-Z 0-9 _ - or non-ASCII
@@ -1509,6 +1512,7 @@ Check if three code points would start an identifier</dfn></h4>
15091512
<dt>U+002D HYPHEN-MINUS
15101513
<dd>
15111514
If the second <a>code point</a> is a <a>name-start code point</a>
1515+
or a U+002D HYPHEN-MINUS,
15121516
or the second and third <a>code points</a> <a>are a valid escape</a>,
15131517
return true.
15141518
Otherwise, return false.
@@ -3213,6 +3217,7 @@ Changes from the 20 February 2014 Candidate Recommendation</h3>
32133217

32143218
<ul>
32153219
<li>Fix several bugs in the tokenization and parsing algorithms.
3220+
<li>Change the definition of ident-like tokens to allow "--" to start an ident.
32163221
</ul>
32173222

32183223
<h3 id="changes-WD-20131105">

css-syntax/Overview.html

Lines changed: 81 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
</p>
5959
<h1 class="p-name no-ref" id=title>CSS Syntax Module Level 3</h1>
6060
<h2 class="no-num no-toc no-ref heading settled heading" id=subtitle><span class=content>Editor’s Draft,
61-
<span class=dt-updated><span class=value-title title=20140313>13 March 2014</span></span></span></h2>
61+
<span class=dt-updated><span class=value-title title=20140320>20 March 2014</span></span></span></h2>
6262
<div data-fill-with=spec-metadata><dl><dt>This version:<dd><a class=u-url href=http://dev.w3.org/csswg/css-syntax/>http://dev.w3.org/csswg/css-syntax/</a><dt>Latest version:<dd><a href=http://www.w3.org/TR/css-syntax-3/>http://www.w3.org/TR/css-syntax-3/</a><dt>Editor’s Draft:<dd><a href=http://dev.w3.org/csswg/css-syntax/>http://dev.w3.org/csswg/css-syntax/</a><dt>Previous Versions:<dd><a href=http://www.w3.org/TR/2014/CR-css-syntax-3-20140220/ rel=previous>http://www.w3.org/TR/2014/CR-css-syntax-3-20140220/</a><dd><a href=http://www.w3.org/TR/2013/WD-css-syntax-3-20131105/ rel=previous>http://www.w3.org/TR/2013/WD-css-syntax-3-20131105/</a><dd><a href=http://www.w3.org/TR/2013/WD-css-syntax-3-20130919/ rel=previous>http://www.w3.org/TR/2013/WD-css-syntax-3-20130919/</a>
6363
<dt>Feedback:</dt>
6464
<dd><a href="mailto:www-style@w3.org?subject=%5Bcss-syntax%5D%20feedback">www-style@w3.org</a>
@@ -911,76 +911,91 @@ <h3 class="heading settled heading" data-level=4.1 id=token-diagrams><span class
911911
</path></g></svg></div>
912912
<dt id=ident-token-diagram><a class=self-link href=#ident-token-diagram></a><a class="production css-code" data-link-type=type href=#typedef-ident-token title="<ident-token>">&lt;ident-token&gt;</a>
913913
<dd>
914-
<div class=railroad><svg class=railroad-diagram height=110 viewBox="0 0 729 110" width=729>
914+
<div class=railroad><svg class=railroad-diagram height=130 viewBox="0 0 769 130" width=769>
915915
<g transform="translate(.5 .5)">
916-
<path d="M 20 31 v 20 m 10 -20 v 20 m -10 -10 h 20.5">
916+
<path d="M 20 51 v 20 m 10 -20 v 20 m -10 -10 h 20.5">
917917
</path><g>
918-
<path d="M40 41h0.0">
919-
</path><path d="M108.0 41h0.0">
920-
</path><path d="M40.0 41h20">
918+
<path d="M40 61h0.0">
919+
</path><path d="M384.0 61h0.0">
920+
</path><path d="M40.0 61a10 10 0 0 0 10 -10v-10a10 10 0 0 1 10 -10">
921921
</path><g>
922-
<path d="M60.0 41h28">
923-
</path></g><path d="M88.0 41h20">
924-
</path><path d="M40.0 41a10 10 0 0 1 10 10v0a10 10 0 0 0 10 10">
922+
<path d="M60.0 31h134.0">
923+
</path><path d="M230.0 31h134.0">
924+
</path><rect height=22 rx=10 ry=10 width=36 x=194.0 y=20>
925+
</rect><text x=212.0 y=35>
926+
--</text></g><path d="M364.0 31a10 10 0 0 1 10 10v10a10 10 0 0 0 10 10">
927+
</path><path d="M40.0 61h20">
925928
</path><g>
926929
<path d="M60.0 61h0.0">
927-
</path><path d="M88.0 61h0.0">
928-
</path><rect height=22 rx=10 ry=10 width=28 x=60.0 y=50>
929-
</rect><text x=74.0 y=65>
930-
-</text></g><path d="M88.0 61a10 10 0 0 0 10 -10v0a10 10 0 0 1 10 -10">
931-
</path></g><g>
932-
<path d="M108 41h0.0">
933-
</path><path d="M344.0 41h0.0">
934-
</path><path d="M108.0 41h20">
930+
</path><path d="M364.0 61h0.0">
935931
</path><g>
936-
<path d="M128.0 41h0.0">
937-
</path><path d="M324.0 41h0.0">
938-
</path><rect height=22 width=196 x=128.0 y=30>
939-
</rect><text x=226.0 y=45>
940-
a-z A-Z _ or non-ASCII</text></g><path d="M324.0 41h20">
941-
</path><path d="M108.0 41a10 10 0 0 1 10 10v10a10 10 0 0 0 10 10">
942-
</path><g>
943-
<path d="M128.0 71h64.0">
944-
</path><path d="M260.0 71h64.0">
945-
</path><rect height=22 width=68 x=192.0 y=60>
946-
</rect><text x=226.0 y=75>
947-
escape</text></g><path d="M324.0 71a10 10 0 0 0 10 -10v-10a10 10 0 0 1 10 -10">
932+
<path d="M60.0 61h0.0">
933+
</path><path d="M128.0 61h0.0">
934+
</path><path d="M60.0 61h20">
935+
</path><g>
936+
<path d="M80.0 61h28">
937+
</path></g><path d="M108.0 61h20">
938+
</path><path d="M60.0 61a10 10 0 0 1 10 10v0a10 10 0 0 0 10 10">
939+
</path><g>
940+
<path d="M80.0 81h0.0">
941+
</path><path d="M108.0 81h0.0">
942+
</path><rect height=22 rx=10 ry=10 width=28 x=80.0 y=70>
943+
</rect><text x=94.0 y=85>
944+
-</text></g><path d="M108.0 81a10 10 0 0 0 10 -10v0a10 10 0 0 1 10 -10">
948945
</path></g><g>
949-
<path d="M344 41h0.0">
950-
</path><path d="M688.0 41h0.0">
951-
</path><path d="M344.0 41a10 10 0 0 0 10 -10v0a10 10 0 0 1 10 -10">
952-
</path><g>
953-
<path d="M364.0 21h304">
954-
</path></g><path d="M668.0 21a10 10 0 0 1 10 10v0a10 10 0 0 0 10 10">
955-
</path><path d="M344.0 41h20">
956-
</path><g>
957-
<path d="M364.0 41h0.0">
958-
</path><path d="M668.0 41h0.0">
959-
</path><path d="M364.0 41h10">
960-
</path><g>
961-
<path d="M374.0 41h0.0">
962-
</path><path d="M658.0 41h0.0">
963-
</path><path d="M374.0 41h20">
964-
</path><g>
965-
<path d="M394.0 41h0.0">
966-
</path><path d="M638.0 41h0.0">
967-
</path><rect height=22 width=244 x=394.0 y=30>
968-
</rect><text x=516.0 y=45>
969-
a-z A-Z 0-9 _ - or non-ASCII</text></g><path d="M638.0 41h20">
970-
</path><path d="M374.0 41a10 10 0 0 1 10 10v10a10 10 0 0 0 10 10">
971-
</path><g>
972-
<path d="M394.0 71h88.0">
973-
</path><path d="M550.0 71h88.0">
974-
</path><rect height=22 width=68 x=482.0 y=60>
975-
</rect><text x=516.0 y=75>
976-
escape</text></g><path d="M638.0 71a10 10 0 0 0 10 -10v-10a10 10 0 0 1 10 -10">
977-
</path></g><path d="M658.0 41h10">
978-
</path><path d="M374.0 41a10 10 0 0 0 -10 10v29a10 10 0 0 0 10 10">
979-
</path><g>
980-
<path d="M374.0 90h284">
981-
</path></g><path d="M658.0 90a10 10 0 0 0 10 -10v-29a10 10 0 0 0 -10 -10">
982-
</path></g><path d="M668.0 41h20">
983-
</path></g><path d="M 688 41 h 20 m -10 -10 v 20 m 10 -20 v 20">
946+
<path d="M128.0 61h0.0">
947+
</path><path d="M364.0 61h0.0">
948+
</path><path d="M128.0 61h20">
949+
</path><g>
950+
<path d="M148.0 61h0.0">
951+
</path><path d="M344.0 61h0.0">
952+
</path><rect height=22 width=196 x=148.0 y=50>
953+
</rect><text x=246.0 y=65>
954+
a-z A-Z _ or non-ASCII</text></g><path d="M344.0 61h20">
955+
</path><path d="M128.0 61a10 10 0 0 1 10 10v10a10 10 0 0 0 10 10">
956+
</path><g>
957+
<path d="M148.0 91h64.0">
958+
</path><path d="M280.0 91h64.0">
959+
</path><rect height=22 width=68 x=212.0 y=80>
960+
</rect><text x=246.0 y=95>
961+
escape</text></g><path d="M344.0 91a10 10 0 0 0 10 -10v-10a10 10 0 0 1 10 -10">
962+
</path></g></g><path d="M364.0 61h20">
963+
</path></g><g>
964+
<path d="M384 61h0.0">
965+
</path><path d="M728.0 61h0.0">
966+
</path><path d="M384.0 61a10 10 0 0 0 10 -10v0a10 10 0 0 1 10 -10">
967+
</path><g>
968+
<path d="M404.0 41h304">
969+
</path></g><path d="M708.0 41a10 10 0 0 1 10 10v0a10 10 0 0 0 10 10">
970+
</path><path d="M384.0 61h20">
971+
</path><g>
972+
<path d="M404.0 61h0.0">
973+
</path><path d="M708.0 61h0.0">
974+
</path><path d="M404.0 61h10">
975+
</path><g>
976+
<path d="M414.0 61h0.0">
977+
</path><path d="M698.0 61h0.0">
978+
</path><path d="M414.0 61h20">
979+
</path><g>
980+
<path d="M434.0 61h0.0">
981+
</path><path d="M678.0 61h0.0">
982+
</path><rect height=22 width=244 x=434.0 y=50>
983+
</rect><text x=556.0 y=65>
984+
a-z A-Z 0-9 _ - or non-ASCII</text></g><path d="M678.0 61h20">
985+
</path><path d="M414.0 61a10 10 0 0 1 10 10v10a10 10 0 0 0 10 10">
986+
</path><g>
987+
<path d="M434.0 91h88.0">
988+
</path><path d="M590.0 91h88.0">
989+
</path><rect height=22 width=68 x=522.0 y=80>
990+
</rect><text x=556.0 y=95>
991+
escape</text></g><path d="M678.0 91a10 10 0 0 0 10 -10v-10a10 10 0 0 1 10 -10">
992+
</path></g><path d="M698.0 61h10">
993+
</path><path d="M414.0 61a10 10 0 0 0 -10 10v29a10 10 0 0 0 10 10">
994+
</path><g>
995+
<path d="M414.0 110h284">
996+
</path></g><path d="M698.0 110a10 10 0 0 0 10 -10v-29a10 10 0 0 0 -10 -10">
997+
</path></g><path d="M708.0 61h20">
998+
</path></g><path d="M 728 61 h 20 m -10 -10 v 20 m 10 -20 v 20">
984999
</path></g></svg></div>
9851000
<dt id=function-token-diagram><a class=self-link href=#function-token-diagram></a><a class="production css-code" data-link-type=type href=#typedef-function-token title="<function-token>">&lt;function-token&gt;</a>
9861001
<dd>
@@ -2561,6 +2576,7 @@ <h4 class="heading settled heading" data-level=4.3.9 id=would-start-an-identifie
25612576
<dt>U+002D HYPHEN-MINUS
25622577
<dd>
25632578
If the second <a data-link-type=dfn href=#code-point title="code point">code point</a> is a <a data-link-type=dfn href=#name-start-code-point title="name-start code point">name-start code point</a>
2579+
or a U+002D HYPHEN-MINUS,
25642580
or the second and third <a data-link-type=dfn href=#code-point title="code points">code points</a> <a data-link-type=dfn href=#check-if-two-code-points-are-a-valid-escape title="are a valid escape">are a valid escape</a>,
25652581
return true.
25662582
Otherwise, return false.
@@ -4698,6 +4714,7 @@ <h3 class="heading settled heading" data-level=10.1 id=changes-CR-20140220><span
46984714

46994715
<p> <ul>
47004716
<li>Fix several bugs in the tokenization and parsing algorithms.
4717+
<li>Change the definition of ident-like tokens to allow "--" to start an ident.
47014718
</ul>
47024719

47034720
<h3 class="heading settled heading" data-level=10.2 id=changes-WD-20131105><span class=secno>10.2 </span><span class=content>

0 commit comments

Comments
 (0)