Skip to content

Commit b27775c

Browse files
committed
[css3-syntax] Add the *-match tokens, from Selectors, per WG resolution.
1 parent 737a066 commit b27775c

2 files changed

Lines changed: 131 additions & 4 deletions

File tree

css3-syntax/Overview.html

Lines changed: 51 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@
1111

1212
<meta content="CSS Syntax Module Level 3 (CSS3 Syntax)" name=dcterms.title>
1313
<meta content=text name=dcterms.type>
14-
<meta content=2013-02-05 name=dcterms.issued>
14+
<meta content=2013-02-06 name=dcterms.issued>
1515
<meta content="http://dev.w3.org/csswg/css3-syntax/" name=dcterms.creator>
1616
<meta content=W3C name=dcterms.publisher>
17-
<meta content="http://www.w3.org/TR/2013/ED-css3-syntax-20130205/"
17+
<meta content="http://www.w3.org/TR/2013/ED-css3-syntax-20130206/"
1818
name=dcterms.identifier>
1919
<link href="#contents" rel=contents>
2020
<link href="#index" rel=index>
@@ -31,7 +31,7 @@
3131

3232
<h1>CSS Syntax Module Level 3</h1>
3333

34-
<h2 class="no-num no-toc" id=longstatus-date>Editor's Draft 5 February
34+
<h2 class="no-num no-toc" id=longstatus-date>Editor's Draft 6 February
3535
2013</h2>
3636

3737
<dl>
@@ -659,6 +659,7 @@ <h2 id=tokenization><span class=secno>4. </span> Tokenization</h2>
659659
<p> The output of the tokenization step is a series of zero or more of the
660660
following tokens: ident, function, at-keyword, hash, string, bad-string,
661661
url, bad-url, delim, number, percentage, dimension, unicode-range,
662+
include-match, dash-match, prefix-match, suffix-match, substring-match,
662663
whitespace, cdo, cdc, colon, semicolon, [, ], (, ), {, }.
663664

664665
<p> ident, function, at-keyword, hash, string, and url tokens have a value
@@ -1374,6 +1375,15 @@ <h4 id=data-state><span class=secno>4.4.1. </span> <dfn id=data-state0>Data
13741375

13751376
<dd> Switch to the <a href="#hash-state0"><i>hash state</i></a>.
13761377

1378+
<dt>U+0024 DOLLAR SIGN ($)
1379+
1380+
<dd> If the <a href="#next-input-character"><i>next input
1381+
character</i></a> is U+003D EQUALS SIGN (=), consume it and emit a
1382+
suffix-match token. Remain in this state.
1383+
<p> Otherwise, emit a delim token with its value set to the <a
1384+
href="#current-input-character"><i>current input character</i></a>.
1385+
Remain in this state.
1386+
13771387
<dt>U+0027 APOSTROPHE (&apos;)
13781388

13791389
<dd> Switch to the <a
@@ -1387,6 +1397,15 @@ <h4 id=data-state><span class=secno>4.4.1. </span> <dfn id=data-state0>Data
13871397

13881398
<dd> Emit a ) token. Remain in this state.
13891399

1400+
<dt>U+002A ASTERISK (*)
1401+
1402+
<dd> If the <a href="#next-input-character"><i>next input
1403+
character</i></a> is U+003D EQUALS SIGN (=), consume it and emit a
1404+
substring-match token. Remain in this state.
1405+
<p> Otherwise, emit a delim token with its value set to the <a
1406+
href="#current-input-character"><i>current input character</i></a>.
1407+
Remain in this state.
1408+
13901409
<dt>U+002B PLUS SIGN (+)
13911410

13921411
<dd> If the <a href="#next-input-character"><i>next input
@@ -1474,6 +1493,15 @@ <h4 id=data-state><span class=secno>4.4.1. </span> <dfn id=data-state0>Data
14741493

14751494
<dd> Emit a ] token. Remain in this state.
14761495

1496+
<dt>U+005E CIRCUMFLEX ACCENT (^)
1497+
1498+
<dd> If the <a href="#next-input-character"><i>next input
1499+
character</i></a> is U+003D EQUALS SIGN (=), consume it and emit a
1500+
prefix-match token. Remain in this state.
1501+
<p> Otherwise, emit a delim token with its value set to the <a
1502+
href="#current-input-character"><i>current input character</i></a>.
1503+
Remain in this state.
1504+
14771505
<dt>U+007B LEFT CURLY BRACKET ({)
14781506

14791507
<dd> Emit a { token. Remain in this state.
@@ -1509,6 +1537,24 @@ <h4 id=data-state><span class=secno>4.4.1. </span> <dfn id=data-state0>Data
15091537
Reconsume the <a href="#current-input-character"><i>current input
15101538
character</i></a>.
15111539

1540+
<dt>U+007C VERTICAL LINE (|)
1541+
1542+
<dd> If the <a href="#next-input-character"><i>next input
1543+
character</i></a> is U+003D EQUALS SIGN (=), consume it and emit a
1544+
dash-match token. Remain in this state.
1545+
<p> Otherwise, emit a delim token with its value set to the <a
1546+
href="#current-input-character"><i>current input character</i></a>.
1547+
Remain in this state.
1548+
1549+
<dt>U+007E TILDE (~)
1550+
1551+
<dd> If the <a href="#next-input-character"><i>next input
1552+
character</i></a> is U+003D EQUALS SIGN (=), consume it and emit an
1553+
includes-match token. Remain in this state.
1554+
<p> Otherwise, emit a delim token with its value set to the <a
1555+
href="#current-input-character"><i>current input character</i></a>.
1556+
Remain in this state.
1557+
15121558
<dt>EOF
15131559

15141560
<dd> Emit an end-of-file token.
@@ -2737,7 +2783,8 @@ <h2 id=parsing><span class=secno>5. </span> Parsing</h2>
27372783

27382784
<dd> The tokens that can appear in the tree are: ident, hash, string, url,
27392785
delim, number, percentage, dimension, unicode-range, whitespace, colon,
2740-
semicolon, at-keyword,
2786+
semicolon, at-keyword, include-match, dash-match, prefix-match,
2787+
suffix-match, and substring-match.
27412788
<p class=note> This means that the following tokens emitted by the
27422789
tokenizer stage will <strong>not</strong> appear in the stylesheet
27432790
object: function, bad-string, bad-url, cdo, cdc, [, ], (, ), {, and }.

css3-syntax/Overview.src.html

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -374,6 +374,11 @@ <h2>
374374
percentage,
375375
dimension,
376376
unicode-range,
377+
include-match,
378+
dash-match,
379+
prefix-match,
380+
suffix-match,
381+
substring-match,
377382
whitespace,
378383
cdo,
379384
cdc,
@@ -579,6 +584,20 @@ <h4>
579584
<dd>
580585
Switch to the <i>hash state</i>.
581586

587+
<dt>U+0024 DOLLAR SIGN ($)
588+
<dd>
589+
If the <i>next input character</i> is
590+
U+003D EQUALS SIGN (=),
591+
consume it
592+
and emit a suffix-match token.
593+
Remain in this state.
594+
595+
<p>
596+
Otherwise,
597+
emit a delim token
598+
with its value set to the <i>current input character</i>.
599+
Remain in this state.
600+
582601
<dt>U+0027 APOSTROPHE (&apos;)
583602
<dd>
584603
Switch to the <i>single-quote-string state</i>.
@@ -593,6 +612,20 @@ <h4>
593612
Emit a ) token.
594613
Remain in this state.
595614

615+
<dt>U+002A ASTERISK (*)
616+
<dd>
617+
If the <i>next input character</i> is
618+
U+003D EQUALS SIGN (=),
619+
consume it
620+
and emit a substring-match token.
621+
Remain in this state.
622+
623+
<p>
624+
Otherwise,
625+
emit a delim token
626+
with its value set to the <i>current input character</i>.
627+
Remain in this state.
628+
596629
<dt>U+002B PLUS SIGN (+)
597630
<dd>
598631
If the <i>next input character</i> is
@@ -712,6 +745,20 @@ <h4>
712745
Emit a ] token.
713746
Remain in this state.
714747

748+
<dt>U+005E CIRCUMFLEX ACCENT (^)
749+
<dd>
750+
If the <i>next input character</i> is
751+
U+003D EQUALS SIGN (=),
752+
consume it
753+
and emit a prefix-match token.
754+
Remain in this state.
755+
756+
<p>
757+
Otherwise,
758+
emit a delim token
759+
with its value set to the <i>current input character</i>.
760+
Remain in this state.
761+
715762
<dt>U+007B LEFT CURLY BRACKET ({)
716763
<dd>
717764
Emit a { token.
@@ -747,6 +794,34 @@ <h4>
747794
Switch to the <i>ident state</i>.
748795
Reconsume the <i>current input character</i>.
749796

797+
<dt>U+007C VERTICAL LINE (|)
798+
<dd>
799+
If the <i>next input character</i> is
800+
U+003D EQUALS SIGN (=),
801+
consume it
802+
and emit a dash-match token.
803+
Remain in this state.
804+
805+
<p>
806+
Otherwise,
807+
emit a delim token
808+
with its value set to the <i>current input character</i>.
809+
Remain in this state.
810+
811+
<dt>U+007E TILDE (~)
812+
<dd>
813+
If the <i>next input character</i> is
814+
U+003D EQUALS SIGN (=),
815+
consume it
816+
and emit an includes-match token.
817+
Remain in this state.
818+
819+
<p>
820+
Otherwise,
821+
emit a delim token
822+
with its value set to the <i>current input character</i>.
823+
Remain in this state.
824+
750825
<dt>EOF
751826
<dd>
752827
Emit an end-of-file token.
@@ -2210,6 +2285,11 @@ <h2>
22102285
colon,
22112286
semicolon,
22122287
at-keyword,
2288+
include-match,
2289+
dash-match,
2290+
prefix-match,
2291+
suffix-match,
2292+
and substring-match.
22132293

22142294
<p class='note'>
22152295
This means that the following tokens emitted by the tokenizer stage will <strong>not</strong> appear in the stylesheet object:

0 commit comments

Comments
 (0)