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-05-10 name =dcterms.date >
14+ < meta content =2013-05-13 name =dcterms.date >
1515 < meta content ="Tab Atkins Jr. " name =dcterms.creator >
1616 < meta content =W3C name =dcterms.publisher >
1717 < meta content ="http://dev.w3.org/csswg/css3-syntax/ "
3232 < h1 class =p-name > CSS Syntax Module Level 3</ h1 >
3333
3434 < h2 class ="no-num no-toc " id =longstatus-date > Editor's Draft < time
35- class =dt-updated datetime =20130510 > 10 May 2013</ time > </ h2 >
35+ class =dt-updated datetime =20130513 > 13 May 2013</ time > </ h2 >
3636
3737 < dl >
3838 < dt > This version:
@@ -3903,30 +3903,31 @@ <h3 id=changes-from-css-2.1-core-grammar><span class=secno>5.5. </span>
39033903 </ ul >
39043904 </ ol >
39053905
3906- < h2 id =anb > < span class =secno > 6. </ span > The < var > An+B</ var > microsyntax</ h2 >
3906+ < h2 id =anb > < span class =secno > 6. </ span > The < a
3907+ href ="#anb0 "> < var > An+B</ var > </ a > microsyntax</ h2 >
39073908
39083909 < p > Several things in CSS, such as the ‘< code
39093910 class =css > :nth-child()</ code > ’ pseudoclass, need to indicate indexes in
3910- a list. The < var > An+B</ var > microsyntax is useful for this, allowing an
3911- author to easily indicate single elements or all elements at
3912- regularly-spaced intervals in a list.
3911+ a list. The < a href =" #anb0 " > < var > An+B</ var > </ a > microsyntax is useful for
3912+ this, allowing an author to easily indicate single elements or all
3913+ elements at regularly-spaced intervals in a list.
39133914
3914- < p > The < var > An+B</ var > notation defines an integer step (< dfn
3915- id =a > A</ dfn > ) and offset (< dfn id =b > B</ dfn > ), and represents the
3916- < var > An+B</ var > th elements in a list, for every positive integer or zero
3917- value of < var > n</ var > , with the first element in the list having index 1
3918- (not 0).
3915+ < p > The < dfn id = anb0 > An+B</ dfn > notation defines an integer step (< dfn
3916+ id =a > A</ dfn > ) and offset (< dfn id =b > B</ dfn > ), and represents the < a
3917+ href =" #anb0 " > < var > An+B</ var > </ a > th elements in a list, for every positive
3918+ integer or zero value of < var > n</ var > , with the first element in the list
3919+ having index 1 (not 0).
39193920
39203921 < p > For values of < a href ="#a "> < var > A</ var > </ a > and < a
39213922 href ="#b "> < var > B</ var > </ a > greater than 0, this effectively dividies the
39223923 list into groups of < a href ="#a "> < var > A</ var > </ a > elements (the last group
39233924 taking the remainder), and selecting the < a href ="#b "> < var > B</ var > </ a > th
39243925 element of each group.
39253926
3926- < p > The < var > An+B</ var > notation also accepts the ‘ < code
3927- class =css > even</ code > ’ and ‘< code class =css > odd</ code > ’ keywords,
3928- which have the same meaning as ‘< code class =css > 2n</ code > ’ and
3929- ‘< code class =css > 2n+1</ code > ’, respectively.
3927+ < p > The < a href =" #anb0 " > < var > An+B</ var > </ a > notation also accepts the
3928+ ‘ < code class =css > even</ code > ’ and ‘< code class =css > odd</ code > ’
3929+ keywords, which have the same meaning as ‘< code class =css > 2n</ code > ’
3930+ and ‘< code class =css > 2n+1</ code > ’, respectively.
39303931
39313932 < div class =example >
39323933 < p > Examples:
@@ -3941,7 +3942,7 @@ <h2 id=anb><span class=secno>6. </span> The <var>An+B</var> microsyntax</h2>
39413942
39423943 < p > The values of < a href ="#a "> < var > A</ var > </ a > and < a
39433944 href ="#b "> < var > B</ var > </ a > can be negative, but only the positive results
3944- of < var > An+B</ var > , for < var > n</ var > ≥ 0, are used.
3945+ of < a href =" #anb0 " > < var > An+B</ var > </ a > , for < var > n</ var > ≥ 0, are used.
39453946
39463947 < div class =example >
39473948 < p > Example:
@@ -4032,24 +4033,51 @@ <h3 id=anb-syntax><span class=secno>6.1. </span> Informal Syntax
40324033 < h3 id =the-anb-type > < span class =secno > 6.2. </ span > The < a
40334034 href ="#anb-production "> < code > <an+b> </ code > </ a > type</ h3 >
40344035
4035- < p > The < var > An+B</ var > notation is defined using a slightly different
4036- tokenizer than the rest of CSS, resulting in a somewhat odd definition
4037- when expressed in terms of CSS tokens. This section describes how to
4038- recognize the < var > An+B</ var > notation in terms of CSS tokens (thus
4039- defining the < code > <an+b type for CSS grammar purposes), and how to
4040- interpret the CSS tokens to obtain values for < a
4041- href ="#a "> < var > A</ var > </ a > and < a href ="#b "> < var > B</ var > </ a > . </ code >
4036+ < p > The < a href ="#anb0 "> < var > An+B</ var > </ a > notation is defined using a
4037+ slightly different tokenizer than the rest of CSS, resulting in a somewhat
4038+ odd definition when expressed in terms of CSS tokens. This section
4039+ describes how to recognize the < a href ="#anb0 "> < var > An+B</ var > </ a >
4040+ notation in terms of CSS tokens (thus defining the < a
4041+ href ="#anb-production "> < var > <an+b> </ var > </ a > type for CSS grammar
4042+ purposes), and how to interpret the CSS tokens to obtain values for < a
4043+ href ="#a "> < var > A</ var > </ a > and < a href ="#b "> < var > B</ var > </ a > .
40424044
4043- < p > The < dfn id =anb-production > <an+b> </ dfn > type is defined as:
4045+ < p > The < a href ="#anb-production "> < var > <an+b> </ var > </ a > type is defined
4046+ as:
40444047
40454048 < pre class =prod >
40464049< dfn id =anb-production > <an+b> </ dfn > =
40474050 odd | even |
4048- <integer> |
4049- <n-dimension> |
4050- <ndashdigit-dimension> |
4051- <n-dimension> <signed-integer> |
4052- <n-dimension> ['+' | '-'] <signless-integer> </ pre >
4051+ < a
4052+ href ="#ltinteger "> < var > <integer> </ var > </ a > |
4053+
4054+ < a
4055+ href ="#ltn-dimension "> < var > <n-dimension> </ var > </ a > |
4056+ '+'? n |
4057+ -n |
4058+
4059+ < a
4060+ href ="#ltndashdigit-dimension "> < var > <ndashdigit-dimension> </ var > </ a > |
4061+ '+'? < a
4062+ href ="#ltndashdigit-ident "> < var > <ndashdigit-ident> </ var > </ a > |
4063+ < a
4064+ href ="#ltdashndashdigit-ident "> < var > <dashndashdigit-ident> </ var > </ a > |
4065+
4066+ < a
4067+ href ="#ltn-dimension "> < var > <n-dimension> </ var > </ a > < a
4068+ href ="#ltsigned-integer "> < var > <signed-integer> </ var > </ a > |
4069+ '+'? n < a
4070+ href ="#ltsigned-integer "> < var > <signed-integer> </ var > </ a > |
4071+ -n < a
4072+ href ="#ltsigned-integer "> < var > <signed-integer> </ var > </ a > |
4073+
4074+ < a
4075+ href ="#ltn-dimension "> < var > <n-dimension> </ var > </ a > ['+' | '-'] < a
4076+ href ="#ltsignless-integer "> < var > <signless-integer> </ var > </ a >
4077+ '+'? n ['+' | '-'] < a
4078+ href ="#ltsignless-integer "> < var > <signless-integer> </ var > </ a > |
4079+ -n ['+' | '-'] < a
4080+ href ="#ltsignless-integer "> < var > <signless-integer> </ var > </ a > </ pre >
40534081
40544082 < p > where:
40554083
@@ -4066,6 +4094,19 @@ <h3 id=the-anb-type><span class=secno>6.2. </span> The <a
40664094 match for "n-*", where "*" is a series of one or more < a
40674095 href ="#digit "> < i > digits</ i > </ a >
40684096
4097+ < li > < dfn id =ltndashdigit-ident > < code > <ndashdigit-ident> </ code > </ dfn > is
4098+ an IDENT token whose representation is an < a
4099+ href ="#ascii-case-insensitive "> < i > ASCII case-insensitive</ i > </ a > match
4100+ for "n-*", where "*" is a series of one or more < a
4101+ href ="#digit "> < i > digits</ i > </ a >
4102+
4103+ < li > < dfn
4104+ id =ltdashndashdigit-ident > < code > <dashndashdigit-ident> </ code > </ dfn > is
4105+ an IDENT token whose representation is an < a
4106+ href ="#ascii-case-insensitive "> < i > ASCII case-insensitive</ i > </ a > match
4107+ for "-n-*", where "*" is a series of one or more < a
4108+ href ="#digit "> < i > digits</ i > </ a >
4109+
40694110 < li > < dfn id =ltinteger > < code > <integer> </ code > </ dfn > is a NUMBER token
40704111 with its type flag set to "integer"
40714112
@@ -4091,32 +4132,58 @@ <h3 id=the-anb-type><span class=secno>6.2. </span> The <a
40914132 < dd > < a href ="#a "> < var > A</ var > </ a > is 2, < a href ="#b "> < var > B</ var > </ a > is
40924133 0.
40934134
4094- < dt > < a href ="#ltinteger "> < code > <integer> </ code > </ a >
4135+ < dt > < a href ="#ltinteger "> < code > < var > <integer> </ var > </ code > </ a >
40954136
40964137 < dd > < a href ="#a "> < var > A</ var > </ a > is 0, < a href ="#b "> < var > B</ var > </ a > is
40974138 the integer.
40984139
4099- < dt > < a href ="#ltn-dimension "> < code > <n-dimension> </ code > </ a >
4140+ < dt > < a href ="#ltn-dimension "> < code > < var > <n-dimension> </ var > </ code > </ a >
4141+
4142+ < dt > < code > '+'? n</ code >
4143+
4144+ < dt > < code > -n</ code >
41004145
4101- < dd > < a href ="#a "> < var > A</ var > </ a > is the dimension's value, < a
4102- href ="#b "> < var > B</ var > </ a > is 0.
4146+ < dd > < a href ="#a "> < var > A</ var > </ a > is the dimension's value, 1, or -1,
4147+ respectively. < a href ="#b "> < var > B</ var > </ a > is 0.
41034148
41044149 < dt > < a
4105- href ="#ltndashdigit-dimension "> < code > <ndashdigit-dimension> </ code > </ a >
4150+ href ="#ltndashdigit-dimension "> < code > < var > <ndashdigit-dimension> </ var > </ code > </ a >
41064151
4107- < dd > < a href ="#a "> < var > A</ var > </ a > is the dimension's value, < a
4108- href ="#b "> < var > B</ var > </ a > is the dimension's unit, with the first two
4109- characters removed and the remainder interpreted as a base-10 number.
4152+ < dt > < code > '+'? < a
4153+ href ="#ltndashdigit-ident "> < var > <ndashdigit-ident> </ var > </ a > </ code >
4154+
4155+ < dt > < a
4156+ href ="#ltdashndashdigit-ident "> < code > < var > <dashndashdigit-ident> </ var > </ code > </ a >
41104157
4111- < dt > < code > <n-dimension> <signed-integer> </ code >
4158+ < dd > < a href ="#a "> < var > A</ var > </ a > is the dimension's value, 1, or -1,
4159+ respectively. < a href ="#b "> < var > B</ var > </ a > is the dimension's unit, with
4160+ the first two characters removed and the remainder interpreted as a
4161+ base-10 number.
41124162
4113- < dd > < a href ="#a "> < var > A </ var > </ a > is the dimension's value, < a
4114- href ="#b "> < var > B </ var > </ a > is the integer
4163+ < dt > < code > < a href ="#ltn-dimension "> < var > <n-dimension > </ var > </ a > < a
4164+ href ="#ltsigned-integer "> < var > <signed-integer > </ var > </ a > </ code >
41154165
4116- < dt > < code > <n-dimension> ['+' | '-'] <signless-integer> </ code >
4166+ < dt > < code > '+'? n < a
4167+ href ="#ltsigned-integer "> < var > <signed-integer> </ var > </ a > </ code >
41174168
4118- < dd > < a href ="#a "> < var > A</ var > </ a > is the dimension's value, < a
4119- href ="#b "> < var > B</ var > </ a > is the integer. If a ‘< code
4169+ < dt > < code > -n < a
4170+ href ="#ltsigned-integer "> < var > <signed-integer> </ var > </ a > </ code >
4171+
4172+ < dd > < a href ="#a "> < var > A</ var > </ a > is the dimension's value, 1, or -1,
4173+ respectively. < a href ="#b "> < var > B</ var > </ a > is the integer.
4174+
4175+ < dt > < code > < a href ="#ltn-dimension "> < var > <n-dimension> </ var > </ a > ['+' |
4176+ '-'] < a
4177+ href ="#ltsignless-integer "> < var > <signless-integer> </ var > </ a > </ code >
4178+
4179+ < dt > < code > '+'? n ['+' | '-'] < a
4180+ href ="#ltsignless-integer "> < var > <signless-integer> </ var > </ a > </ code >
4181+
4182+ < dt > < code > -n ['+' | '-'] < a
4183+ href ="#ltsignless-integer "> < var > <signless-integer> </ var > </ a > </ code >
4184+
4185+ < dd > < a href ="#a "> < var > A</ var > </ a > is the dimension's value, 1, or -1,
4186+ respectively. < a href ="#b "> < var > B</ var > </ a > is the integer. If a ‘< code
41204187 class =property > -</ code > ’ was provided between the two, < a
41214188 href ="#b "> < var > B</ var > </ a > is instead the negation of the integer.
41224189 </ dl >
@@ -4321,6 +4388,8 @@ <h2 class=no-num id=index> Index</h2>
43214388 < li > <an+b> , < a href ="#anb-production "
43224389 title ="section 6.2. "> < strong > 6.2.</ strong > </ a >
43234390
4391+ < li > An+B, < a href ="#anb0 " title ="section 6. "> < strong > 6.</ strong > </ a >
4392+
43244393 < li > are a valid escape, < a
43254394 href ="#check-if-two-characters-are-a-valid-esca0 "
43264395 title ="section 4.5.4. "> < strong > 4.5.4.</ strong > </ a >
@@ -4399,6 +4468,10 @@ <h2 class=no-num id=index> Index</h2>
43994468 < li > current input token, < a href ="#current-input-token "
44004469 title ="section 5.2. "> < strong > 5.2.</ strong > </ a >
44014470
4471+ < li > < code > <dashndashdigit-ident> </ code > , < a
4472+ href ="#ltdashndashdigit-ident "
4473+ title ="section 6.2. "> < strong > 6.2.</ strong > </ a >
4474+
44024475 < li > Data state, < a href ="#data-state0 "
44034476 title ="section 4.4.1. "> < strong > 4.4.1.</ strong > </ a >
44044477
@@ -4465,6 +4538,9 @@ <h2 class=no-num id=index> Index</h2>
44654538 href ="#ltndashdigit-dimension "
44664539 title ="section 6.2. "> < strong > 6.2.</ strong > </ a >
44674540
4541+ < li > < code > <ndashdigit-ident> </ code > , < a href ="#ltndashdigit-ident "
4542+ title ="section 6.2. "> < strong > 6.2.</ strong > </ a >
4543+
44684544 < li > < code > <n-dimension> </ code > , < a href ="#ltn-dimension "
44694545 title ="section 6.2. "> < strong > 6.2.</ strong > </ a >
44704546
0 commit comments