Skip to content

Commit fc78263

Browse files
committed
[css-syntax] Fix <an+b> grammar for cases that contain "n- "
1 parent 690f1a7 commit fc78263

File tree

2 files changed

+25
-6
lines changed

2 files changed

+25
-6
lines changed

css-syntax/Overview.html

+13-3
Original file line numberDiff line numberDiff line change
@@ -2503,17 +2503,19 @@ <h3 data-level=6.2 id=the-anb-type><span class=secno>6.2 </span><span class=cont
25032503
'+'?<sup><a href=#anb-plus></a></sup> n <var>&lt;signed-integer&gt;</var> |
25042504
-n <var>&lt;signed-integer&gt;</var> |
25052505

2506+
<var>&lt;ndash-dimension&gt;</var> <var>&lt;signless-integer&gt;</var> |
2507+
'+'?<sup><a href=#anb-plus></a></sup> n- <var>&lt;signless-integer&gt;</var> |
2508+
-n- <var>&lt;signless-integer&gt;</var> |
2509+
25062510
<var>&lt;n-dimension&gt;</var> ['+' | '-'] <var>&lt;signless-integer&gt;</var>
25072511
'+'?<sup><a href=#anb-plus></a></sup> n ['+' | '-'] <var>&lt;signless-integer&gt;</var> |
25082512
-n ['+' | '-'] <var>&lt;signless-integer&gt;</var>
25092513
</pre>
2510-
<p class=issue>
2511-
Ugh, I'm missing cases like "n- 5".
2512-
25132514
<p> where:
25142515

25152516
<p> <ul>
25162517
<li><dfn data-dfn-type=type id=typedef-n-dimension><code>&lt;n-dimension&gt;</code></dfn> is a 〈dimension〉 with its type flag set to "integer", and a unit that is an <a href=#ascii-case-insensitive>ASCII case-insensitive</a> match for "n"
2518+
<li><dfn data-dfn-type=type id=typedef-ndash-dimension><code>&lt;ndash-dimension&gt;</code></dfn> is a 〈dimension〉 with its type flag set to "integer", and a unit that is an <a href=#ascii-case-insensitive>ASCII case-insensitive</a> match for "n-"
25172519
<li><dfn data-dfn-type=type id=typedef-ndashdigit-dimension><code>&lt;ndashdigit-dimension&gt;</code></dfn> is a 〈dimension〉 with its type flag set to "integer", and a unit that is an <a href=#ascii-case-insensitive>ASCII case-insensitive</a> match for "n-*", where "*" is a series of one or more <a href=#digit>digits</a>
25182520
<li><dfn data-dfn-type=type id=typedef-ndashdigit-ident><code>&lt;ndashdigit-ident&gt;</code></dfn> is an 〈ident〉 whose value is an <a href=#ascii-case-insensitive>ASCII case-insensitive</a> match for "n-*", where "*" is a series of one or more <a href=#digit>digits</a>
25192521
<li><dfn data-dfn-type=type id=typedef-dashndashdigit-ident><code>&lt;dashndashdigit-ident&gt;</code></dfn> is an 〈ident〉 whose value is an <a href=#ascii-case-insensitive>ASCII case-insensitive</a> match for "-n-*", where "*" is a series of one or more <a href=#digit>digits</a>
@@ -2570,6 +2572,13 @@ <h3 data-level=6.2 id=the-anb-type><span class=secno>6.2 </span><span class=cont
25702572
<var>A</var> is the dimension's value, 1, or -1, respectively.
25712573
<var>B</var> is the integer’s value.
25722574

2575+
<dt><code><var>&lt;ndash-dimension&gt;</var> <var>&lt;signless-integer&gt;</var></code>
2576+
<dt><code>'+'? n- <var>&lt;signless-integer&gt;</var></code>
2577+
<dt><code>-n- <var>&lt;signless-integer&gt;</var></code>
2578+
<dd>
2579+
<var>A</var> is the dimension's value, 1, or -1, respectively.
2580+
<var>B</var> is the negation of the integer’s value.
2581+
25732582
<dt><code><var>&lt;n-dimension&gt;</var> ['+' | '-'] <var>&lt;signless-integer&gt;</var></code>
25742583
<dt><code>'+'? n ['+' | '-'] <var>&lt;signless-integer&gt;</var></code>
25752584
<dt><code>-n ['+' | '-'] <var>&lt;signless-integer&gt;</var></code>
@@ -3235,6 +3244,7 @@ <h2 class="no-num no-ref" id=index><span class=content>
32353244
<li>name-start character, <a href=#name-start-character title="section 4.2">4.2</a>
32363245
<li>&lt;ndashdigit-dimension&gt;, <a href=#typedef-ndashdigit-dimension title="section 6.2">6.2</a>
32373246
<li>&lt;ndashdigit-ident&gt;, <a href=#typedef-ndashdigit-ident title="section 6.2">6.2</a>
3247+
<li>&lt;ndash-dimension&gt;, <a href=#typedef-ndash-dimension title="section 6.2">6.2</a>
32383248
<li>&lt;n-dimension&gt;, <a href=#typedef-n-dimension title="section 6.2">6.2</a>
32393249
<li>newline, <a href=#newline title="section 4.2">4.2</a>
32403250
<li>next input character, <a href=#next-input-character title="section 4.2">4.2</a>

css-syntax/Overview.src.html

+12-3
Original file line numberDiff line numberDiff line change
@@ -2383,18 +2383,20 @@ <h3 id="the-anb-type">
23832383
'+'?<sup><a href="#anb-plus"></a></sup> n <var>&lt;signed-integer></var> |
23842384
-n <var>&lt;signed-integer></var> |
23852385

2386+
<var>&lt;ndash-dimension></var> <var>&lt;signless-integer></var> |
2387+
'+'?<sup><a href="#anb-plus"></a></sup> n- <var>&lt;signless-integer></var> |
2388+
-n- <var>&lt;signless-integer></var> |
2389+
23862390
<var>&lt;n-dimension></var> ['+' | '-'] <var>&lt;signless-integer></var>
23872391
'+'?<sup><a href="#anb-plus"></a></sup> n ['+' | '-'] <var>&lt;signless-integer></var> |
23882392
-n ['+' | '-'] <var>&lt;signless-integer></var>
23892393
</pre>
23902394

2391-
<p class='issue'>
2392-
Ugh, I'm missing cases like "n- 5".
2393-
23942395
where:
23952396

23962397
<ul>
23972398
<li><dfn><code>&lt;n-dimension></code></dfn> is a 〈dimension〉 with its type flag set to "integer", and a unit that is an <a>ASCII case-insensitive</a> match for "n"
2399+
<li><dfn><code>&lt;ndash-dimension></code></dfn> is a 〈dimension〉 with its type flag set to "integer", and a unit that is an <a>ASCII case-insensitive</a> match for "n-"
23982400
<li><dfn><code>&lt;ndashdigit-dimension></code></dfn> is a 〈dimension〉 with its type flag set to "integer", and a unit that is an <a>ASCII case-insensitive</a> match for "n-*", where "*" is a series of one or more <a>digits</a>
23992401
<li><dfn><code>&lt;ndashdigit-ident></code></dfn> is an 〈ident〉 whose value is an <a>ASCII case-insensitive</a> match for "n-*", where "*" is a series of one or more <a>digits</a>
24002402
<li><dfn><code>&lt;dashndashdigit-ident></code></dfn> is an 〈ident〉 whose value is an <a>ASCII case-insensitive</a> match for "-n-*", where "*" is a series of one or more <a>digits</a>
@@ -2451,6 +2453,13 @@ <h3 id="the-anb-type">
24512453
<var>A</var> is the dimension's value, 1, or -1, respectively.
24522454
<var>B</var> is the integer’s value.
24532455

2456+
<dt><code><var>&lt;ndash-dimension></var> <var>&lt;signless-integer></var></code>
2457+
<dt><code>'+'? n- <var>&lt;signless-integer></var></code>
2458+
<dt><code>-n- <var>&lt;signless-integer></var></code>
2459+
<dd>
2460+
<var>A</var> is the dimension's value, 1, or -1, respectively.
2461+
<var>B</var> is the negation of the integer’s value.
2462+
24542463
<dt><code><var>&lt;n-dimension></var> ['+' | '-'] <var>&lt;signless-integer></var></code>
24552464
<dt><code>'+'? n ['+' | '-'] <var>&lt;signless-integer></var></code>
24562465
<dt><code>-n ['+' | '-'] <var>&lt;signless-integer></var></code>

0 commit comments

Comments
 (0)