@@ -165,7 +165,13 @@ <h2 class="no-num no-toc" id=toc>Table of Contents</h2>
165165 of the serializing algorithm </ a >
166166 </ ul >
167167
168- < li > < a href ="#processing "> < span class =secno > 3.1.2. </ span > Processing
168+ < li > < a href ="#selectors "> < span class =secno > 3.1.2. </ span > Selectors</ a >
169+
170+
171+ < li > < a href ="#css-page "> < span class =secno > 3.1.3. </ span > CSS Page
172+ Selectors</ a >
173+
174+ < li > < a href ="#processing "> < span class =secno > 3.1.4. </ span > Processing
169175 CSS Statements</ a >
170176 </ ul >
171177
@@ -300,11 +306,9 @@ <h2 class="no-num no-toc" id=toc>Table of Contents</h2>
300306
301307 < li > < a href ="#canon "> < span class =secno > 5. </ span > Canonicalization </ a >
302308 < ul class =toc >
303- < li > < a href ="#selectors "> < span class =secno > 5.1. </ span > Selectors</ a >
304-
305- < li > < a href ="#media "> < span class =secno > 5.2. </ span > Media queries</ a >
309+ < li > < a href ="#media "> < span class =secno > 5.1. </ span > Media queries</ a >
306310 < ul class =toc >
307- < li > < a href ="#examples1 "> < span class =secno > 5.2 .1. </ span > Examples</ a >
311+ < li > < a href ="#examples1 "> < span class =secno > 5.1 .1. </ span > Examples</ a >
308312 </ ul >
309313 </ ul >
310314
@@ -1131,7 +1135,7 @@ <h3 id=parsing><span class=secno>3.1. </span>Parsing and Serializing CSS
11311135 <!--
11321136 statement "[S|CDO|CDC]* [ import [S|CDO|CDC]* ]* [ [ ruleset | media | page ] [S|CDO|CDC]* ]*" ??
11331137
1134- selectors "S* selector [ COMMA S* selector ] *"
1138+ selectors "*"
11351139 page selectors "S* pseudo_page? S*"
11361140
11371141 declaration "S* declaration" (properties, property values, property priority)
@@ -1150,16 +1154,14 @@ <h4 id=css-values><span class=secno>3.1.1. </span>CSS values</h4>
11501154 operation failed.
11511155
11521156 < ol >
1153- < li > Remove any leading < a href ="#whitespace "> whitespace</ a > characters.
1154-
1155- < li > Parse the remainder using the < code > expr</ code > production in
1157+ < li > Parse the value using the < code > S* expr</ code > production in
11561158 combination with the allowed values for the given < var
11571159 title =""> property</ var > . If this fails return "null". Otherwise return
11581160 the parsed value.
11591161 </ ol >
11601162
1161- < p > The < code > expr </ code > production is defined in the CSS 2.1
1162- specification. [CSS21 ]
1163+ < p > The aforementioned production is defined in the CSS 2.1 specification.
1164+ [CSS ]
11631165
11641166 < p > The rules for < dfn id =serializing title ="CSS value
11651167 serializing "> serializing a CSS value</ dfn > are as given in the following
@@ -1398,7 +1400,56 @@ <h5 id=examples0><span class=secno>3.1.1.1. </span>Examples of the
13981400 </ table >
13991401 </ div >
14001402
1401- < h4 id =processing > < span class =secno > 3.1.2. </ span > Processing CSS Statements</ h4 >
1403+ < h4 id =selectors > < span class =secno > 3.1.2. </ span > Selectors</ h4 >
1404+
1405+ < p > The rules for < dfn id =parsing1 title =selectors-parsing > parsing a group
1406+ of selectors</ dfn > are as given in the following algorithm. The return
1407+ value is either a group of selectors or "null" (if parsing failed).
1408+
1409+ < ol >
1410+ < li > Parse the value using the < code > selectors_group</ code > production. If
1411+ this fails return "null". Otherwise return the parsed value.
1412+ </ ol >
1413+
1414+ < p > The aforementioned production is defined in the Selectors specification.
1415+ [Selectors]
1416+
1417+ < p > The rules for < dfn id =serializing0 title ="selectors
1418+ serializing "> serializing a group of selectors</ dfn > are as given in the
1419+ following algorithm:
1420+
1421+ < ol >
1422+ < li >
1423+ < p > Replace one or more consecutive < a href ="#whitespace "> whitespace</ a >
1424+ characters with a single U+0020 character.
1425+
1426+ < li >
1427+ < p > Remove leading and trailing < a href ="#whitespace "> whitespace</ a > .
1428+
1429+ < li >
1430+ < p > Make sure combinators other than the descendant combinator are
1431+ preceded and followed by a single U+0020 character (and not more).
1432+
1433+ < li >
1434+ < p > Make sure each U+002C (< code > ,</ code > ) character is followed by a
1435+ single U+0020 character (and not more).
1436+
1437+ < li >
1438+ < p > Convert pseudo-classes and pseudo-elements to their canonical form as
1439+ given in the specification. < span class =note > < code > :HOver</ code > becomes
1440+ < code > :hover</ code > and < code > :befoRe</ code > becomes
1441+ < code > ::before</ code > for example.</ span >
1442+
1443+ < li >
1444+ < p class =issue > Hmm, what about pseudo-classes taking arguments? Attribute
1445+ selectors? Namespace prefixes?
1446+ </ ol >
1447+
1448+ < h4 id =css-page > < span class =secno > 3.1.3. </ span > CSS Page Selectors</ h4 >
1449+
1450+ < p class =issue > ...
1451+
1452+ < h4 id =processing > < span class =secno > 3.1.4. </ span > Processing CSS Statements</ h4 >
14021453
14031454 < p > The rules for < dfn id =inserting title ="insert a statement "> inserting a
14041455 statement</ dfn > are as given in the following algorithm. The variables
@@ -3136,42 +3187,7 @@ <h2 id=canon><span class=secno>5. </span>Canonicalization</h2>
31363187 < p > The definitions from this section are used later to define attribute
31373188 values, et cetera.
31383189
3139- < h3 id =selectors > < span class =secno > 5.1. </ span > Selectors</ h3 >
3140-
3141- < p > The < dfn id =canon-selectors > canonicalization of a group of
3142- selectors</ dfn > can be determined as follows:
3143-
3144- < ol >
3145- < li > < a href ="#canonicalization " title =canon-selector > Normalize the
3146- individual selectors</ a > .
3147-
3148- < li > Separate those selectors by a literal U+002C COMMA and U+0020 SPACE.
3149- </ ol >
3150-
3151- < p > The < dfn id =canonicalization title =canon-selector > canonicalization of a
3152- selector</ dfn > can be determined as follows:
3153-
3154- < ol >
3155- < li > Take the literal input.
3156-
3157- < li > Replace one or more consecutive < a href ="#whitespace "> whitespace</ a >
3158- characters with a U+0020 SPACE.
3159-
3160- < li > Remove leading and trailing < a href ="#whitespace "> whitespace</ a > .
3161-
3162- < li > Make sure combinators other than the descendant combinator are
3163- preceded and followed by a U+0020 SPACE. (So only insert it when it's not
3164- there already.)
3165-
3166- < li > Pseudo-classes and pseudo-elements are to be converted to their
3167- canonical form. < code > :HOver</ code > becomes < code > :hover</ code > and
3168- < code > :befoRe</ code > becomes < code > ::before</ code > for example.
3169- </ ol >
3170-
3171- < p class =issue > Hmm, what about pseudo-classes taking arguments? Attribute
3172- selectors? Namespace prefixes?
3173-
3174- < h3 id =media > < span class =secno > 5.2. </ span > Media queries</ h3 >
3190+ < h3 id =media > < span class =secno > 5.1. </ span > Media queries</ h3 >
31753191
31763192 < p > The < dfn id =canon-media title =canon-media > canonicalization of a media
31773193 query</ dfn > can be determined as follows:
@@ -3205,7 +3221,7 @@ <h3 id=media><span class=secno>5.2. </span>Media queries</h3>
32053221
32063222 < p class =issue > duplicate features?
32073223
3208- < h4 id =examples1 > < span class =secno > 5.2 .1. </ span > Examples</ h4 >
3224+ < h4 id =examples1 > < span class =secno > 5.1 .1. </ span > Examples</ h4 >
32093225
32103226 < div class =example >
32113227 < p > The canonical form of the following query:</ p >
0 commit comments