Skip to content

Commit 2b80c28

Browse files
committed
Fold in the hashless colors and unitless length quirks from zcorpan's quirks document.
1 parent 312d710 commit 2b80c28

2 files changed

Lines changed: 193 additions & 23 deletions

File tree

css3-syntax/Overview.html

Lines changed: 118 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636

3737
<h1>CSS Syntax Module Level 3</h1>
3838

39-
<h2 class="no-num no-toc" id=longstatus-date>Editor's Draft 20 August 2012</h2>
39+
<h2 class="no-num no-toc" id=longstatus-date>Editor's Draft 21 August 2012</h2>
4040

4141
<dl>
4242
<dt>This version:
@@ -305,20 +305,28 @@ <h2 class="no-num no-toc" id=contents> Table of contents</h2>
305305
<li><a href="#consume-a-primitive"><span class=secno>3.6.12. </span>
306306
Consume a primitive</a>
307307

308-
<li><a href="#consume-a-simple-block"><span class=secno>3.6.13.
308+
<li><a href="#consume-a-primitive-with-the-hashless-co"><span
309+
class=secno>3.6.13. </span> Consume a primitive with the hashless
310+
color quirk</a>
311+
312+
<li><a href="#consume-a-primitive-with-the-unitless-le"><span
313+
class=secno>3.6.14. </span> Consume a primitive with the unitless
314+
length quirk</a>
315+
316+
<li><a href="#consume-a-simple-block"><span class=secno>3.6.15.
309317
</span> Consume a simple block</a>
310318

311-
<li><a href="#consume-a-function"><span class=secno>3.6.14. </span>
319+
<li><a href="#consume-a-function"><span class=secno>3.6.16. </span>
312320
Consume a function</a>
313321

314322
<li><a href="#switch-to-the-current-rules-content-mode"><span
315-
class=secno>3.6.15. </span> Switch to the current rule's content
323+
class=secno>3.6.17. </span> Switch to the current rule's content
316324
mode</a>
317325

318-
<li><a href="#pop-the-current-rule"><span class=secno>3.6.16. </span>
326+
<li><a href="#pop-the-current-rule"><span class=secno>3.6.18. </span>
319327
Pop the current rule</a>
320328

321-
<li><a href="#finish-parsing"><span class=secno>3.6.17. </span> Finish
329+
<li><a href="#finish-parsing"><span class=secno>3.6.19. </span> Finish
322330
parsing</a>
323331
</ul>
324332

@@ -2433,10 +2441,27 @@ <h4 id=declaration-value-mode><span class=secno>3.6.8. </span> <dfn
24332441

24342442
<dt>anything else
24352443

2436-
<dd> <a href="#consume-a-primitive0"><i>Consume a primitive</i></a> and
2437-
append the returned value to the value of the <a
2438-
href="#current-declaration"><i>current declaration</i></a>. Remain in
2439-
this mode.
2444+
<dd> If the document is in quirks mode and the <a
2445+
href="#current-declaration"><i>current declaration's</i></a> name is on
2446+
the <a href="#hashless-color-quirk-list"><i>hashless color quirk
2447+
list</i></a>, <a
2448+
href="#consume-a-primitive-with-the-hashless-co0"><i>consume a primitive
2449+
with the hashless color quirk</i></a> and append the returned value to
2450+
the value of the <a href="#current-declaration"><i>current
2451+
declaration</i></a>. Remain in this mode.
2452+
<p> Otherwise, if the document is in quirks mode and the <a
2453+
href="#current-declaration"><i>current declaration's</i></a> name is on
2454+
the <a href="#unitless-length-quirk-list"><i>unitless length quirk
2455+
list</i></a>, <a
2456+
href="#consume-a-primitive-with-the-unitless-le0"><i>consume a primitive
2457+
with the unitless length quirk</i></a> and append the returned value to
2458+
the value of the <a href="#current-declaration"><i>current
2459+
declaration</i></a>. Remain in this mode.
2460+
2461+
<p> Otherwise, <a href="#consume-a-primitive0"><i>consume a
2462+
primitive</i></a> and append the returned value to the value of the <a
2463+
href="#current-declaration"><i>current declaration</i></a>. Remain in
2464+
this mode.
24402465
</dl>
24412466

24422467
<h4 id=declaration-end-mode><span class=secno>3.6.9. </span> <dfn
@@ -2550,7 +2575,62 @@ <h4 id=consume-a-primitive><span class=secno>3.6.12. </span> <dfn
25502575
<p> Otherwise, return the <a href="#current-input-token"><i>current input
25512576
token</i></a>.
25522577

2553-
<h4 id=consume-a-simple-block><span class=secno>3.6.13. </span> <dfn
2578+
<h4 id=consume-a-primitive-with-the-hashless-co><span class=secno>3.6.13.
2579+
</span> <dfn id=consume-a-primitive-with-the-hashless-co0>Consume a
2580+
primitive with the hashless color quirk</dfn></h4>
2581+
2582+
<p> This section describes how to <a
2583+
href="#consume-a-primitive-with-the-hashless-co0"><i>consume a primitive
2584+
with the hashless color quirk</i></a>.
2585+
2586+
<p> The <dfn id=hashless-color-quirk-list>hashless color quirk list</dfn>
2587+
contains the following properties:
2588+
2589+
<ul>
2590+
<li>
2591+
<p class=issue>Fill this list.
2592+
</ul>
2593+
2594+
<p> If the <a href="#current-input-token"><i>current input token</i></a> is
2595+
a number token, let <var>value</var> be the token's representation. If the
2596+
<a href="#current-input-token"><i>current input token</i></a> is a
2597+
dimension token, let <var>value</var> be the token's representation
2598+
followed by the token's unit. If the <a
2599+
href="#current-input-token"><i>current input token</i></a> is an
2600+
identifier token, let <var>value</var> be the token's value.
2601+
2602+
<p> If <var>value has a length of 3 or 6 and is composed solely of <a
2603+
href="#hex-digit"><i>hex digits</i></a>, create a hash token with its
2604+
value set to the <var>value</var> and return it. </var>
2605+
2606+
<p> Otherwise, <a href="#consume-a-primitive0"><i>consume a
2607+
primitive</i></a> and return the returned value.
2608+
2609+
<h4 id=consume-a-primitive-with-the-unitless-le><span class=secno>3.6.14.
2610+
</span> <dfn id=consume-a-primitive-with-the-unitless-le0>Consume a
2611+
primitive with the unitless length quirk</dfn></h4>
2612+
2613+
<p> This section describes how to <a
2614+
href="#consume-a-primitive-with-the-unitless-le0"><i>consume a primitive
2615+
with the unitless length quirk</i></a>.
2616+
2617+
<p> The <dfn id=unitless-length-quirk-list>unitless length quirk list</dfn>
2618+
contains the following properties:
2619+
2620+
<ul>
2621+
<li>
2622+
<p class=issue>Fill this list.
2623+
</ul>
2624+
2625+
<p> If the <a href="#current-input-token"><i>current input token</i></a> is
2626+
a number token, create a dimension token with its value and representation
2627+
set to the token's value and representation, and its unit set to "px".
2628+
Return the dimension token.
2629+
2630+
<p> Otherwise, <a href="#consume-a-primitive0"><i>consume a
2631+
primitive</i></a> and return the returned value.
2632+
2633+
<h4 id=consume-a-simple-block><span class=secno>3.6.15. </span> <dfn
25542634
id=consume-a-simple-block0>Consume a simple block</dfn></h4>
25552635

25562636
<p> This section describes how to <a
@@ -2582,7 +2662,7 @@ <h4 id=consume-a-simple-block><span class=secno>3.6.13. </span> <dfn
25822662
href="#current-block"><i>current block</i></a>.
25832663
</dl>
25842664

2585-
<h4 id=consume-a-function><span class=secno>3.6.14. </span> <dfn
2665+
<h4 id=consume-a-function><span class=secno>3.6.16. </span> <dfn
25862666
id=consume-a-function0>Consume a function</dfn></h4>
25872667

25882668
<p> This section describes how to <a href="#consume-a-function0"><i>consume
@@ -2614,7 +2694,7 @@ <h4 id=consume-a-function><span class=secno>3.6.14. </span> <dfn
26142694
append the returned value to the value of the <i>current argument</i>.
26152695
</dl>
26162696

2617-
<h4 id=switch-to-the-current-rules-content-mode><span class=secno>3.6.15.
2697+
<h4 id=switch-to-the-current-rules-content-mode><span class=secno>3.6.17.
26182698
</span> <dfn id=switch-to-the-current-rules-content-mode0>Switch to the
26192699
current rule's content mode</dfn></h4>
26202700

@@ -2634,7 +2714,7 @@ <h4 id=switch-to-the-current-rules-content-mode><span class=secno>3.6.15.
26342714
<p> If the <a href="#current-rule"><i>current rule</i></a> is a stylesheet,
26352715
switch to the <a href="#top-level-mode0"><i>top-level mode</i></a>.
26362716

2637-
<h4 id=pop-the-current-rule><span class=secno>3.6.16. </span> <dfn
2717+
<h4 id=pop-the-current-rule><span class=secno>3.6.18. </span> <dfn
26382718
id=pop-the-current-rule0>Pop the current rule</dfn></h4>
26392719

26402720
<p> This section describes how to <a href="#pop-the-current-rule0"><i>pop
@@ -2650,7 +2730,7 @@ <h4 id=pop-the-current-rule><span class=secno>3.6.16. </span> <dfn
26502730
append it to the value of the new <a href="#current-rule"><i>current
26512731
rule</i></a>.
26522732

2653-
<h4 id=finish-parsing><span class=secno>3.6.17. </span> <dfn
2733+
<h4 id=finish-parsing><span class=secno>3.6.19. </span> <dfn
26542734
id=finish-parsing0>Finish parsing</dfn></h4>
26552735

26562736
<p> This section describes how to <a href="#finish-parsing0"><i>finish
@@ -2966,19 +3046,29 @@ <h2 class=no-num id=index> Index</h2>
29663046
title="Comment state"><strong>3.4.8.</strong></a>
29673047

29683048
<li>Consume a function, <a href="#consume-a-function0"
2969-
title="Consume a function"><strong>3.6.14.</strong></a>
3049+
title="Consume a function"><strong>3.6.16.</strong></a>
29703050

29713051
<li>Consume an escaped character, <a href="#consume-an-escaped-character0"
29723052
title="Consume an escaped character"><strong>3.4.26.</strong></a>
29733053

29743054
<li>Consume a primitive, <a href="#consume-a-primitive0"
29753055
title="Consume a primitive"><strong>3.6.12.</strong></a>
29763056

3057+
<li>Consume a primitive with the hashless color quirk, <a
3058+
href="#consume-a-primitive-with-the-hashless-co0"
3059+
title="Consume a primitive with the hashless color quirk"><strong>3.6.13.</strong></a>
3060+
3061+
3062+
<li>Consume a primitive with the unitless length quirk, <a
3063+
href="#consume-a-primitive-with-the-unitless-le0"
3064+
title="Consume a primitive with the unitless length quirk"><strong>3.6.14.</strong></a>
3065+
3066+
29773067
<li>Consume a simple block, <a href="#consume-a-simple-block0"
2978-
title="Consume a simple block"><strong>3.6.13.</strong></a>
3068+
title="Consume a simple block"><strong>3.6.15.</strong></a>
29793069

29803070
<li>current block, <a href="#current-block"
2981-
title="current block"><strong>3.6.13.</strong></a>
3071+
title="current block"><strong>3.6.15.</strong></a>
29823072

29833073
<li>current declaration, <a href="#current-declaration"
29843074
title="current declaration"><strong>3.6.1.</strong></a>
@@ -3016,13 +3106,16 @@ <h2 class=no-num id=index> Index</h2>
30163106
title="Double-quote-string state"><strong>3.4.4.</strong></a>
30173107

30183108
<li>ending token, <a href="#ending-token"
3019-
title="ending token"><strong>3.6.13.</strong></a>
3109+
title="ending token"><strong>3.6.15.</strong></a>
30203110

30213111
<li>end of the range, <a href="#end-of-the-range"
30223112
title="end of the range"><strong>3.4.27.</strong></a>
30233113

30243114
<li>Finish parsing, <a href="#finish-parsing0"
3025-
title="Finish parsing"><strong>3.6.17.</strong></a>
3115+
title="Finish parsing"><strong>3.6.19.</strong></a>
3116+
3117+
<li>hashless color quirk list, <a href="#hashless-color-quirk-list"
3118+
title="hashless color quirk list"><strong>3.6.13.</strong></a>
30263119

30273120
<li>Hash-rest state, <a href="#hash-rest-state0"
30283121
title="Hash-rest state"><strong>3.4.7.</strong></a>
@@ -3083,7 +3176,7 @@ <h2 class=no-num id=index> Index</h2>
30833176
title="Number state"><strong>3.4.14.</strong></a>
30843177

30853178
<li>Pop the current rule, <a href="#pop-the-current-rule0"
3086-
title="Pop the current rule"><strong>3.6.16.</strong></a>
3179+
title="Pop the current rule"><strong>3.6.18.</strong></a>
30873180

30883181
<li>renderer, <a href="#renderer" title=renderer><strong>4.2.</strong></a>
30893182

@@ -3126,7 +3219,7 @@ <h2 class=no-num id=index> Index</h2>
31263219

31273220
<li>Switch to the current rule's content mode, <a
31283221
href="#switch-to-the-current-rules-content-mode0"
3129-
title="Switch to the current rule's content mode"><strong>3.6.15.</strong></a>
3222+
title="Switch to the current rule's content mode"><strong>3.6.17.</strong></a>
31303223

31313224

31323225
<li>Top-level mode, <a href="#top-level-mode0"
@@ -3143,6 +3236,9 @@ <h2 class=no-num id=index> Index</h2>
31433236
<li>Unicode-range state, <a href="#unicode-range-state0"
31443237
title="Unicode-range state"><strong>3.4.25.</strong></a>
31453238

3239+
<li>unitless length quirk list, <a href="#unitless-length-quirk-list"
3240+
title="unitless length quirk list"><strong>3.6.14.</strong></a>
3241+
31463242
<li>uppercase letter, <a href="#uppercase-letter"
31473243
title="uppercase letter"><strong>3.4.2.</strong></a>
31483244

css3-syntax/Overview.src.html

Lines changed: 75 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2458,10 +2458,28 @@ <h4>
24582458

24592459
<dt>anything else
24602460
<dd>
2461-
<i>Consume a primitive</i>
2461+
If the document is in quirks mode
2462+
and the <i>current declaration's</i> name is on the <i>hashless color quirk list</i>,
2463+
<i>consume a primitive with the hashless color quirk</i>
24622464
and append the returned value
24632465
to the value of the <i>current declaration</i>.
24642466
Remain in this mode.
2467+
2468+
<p>
2469+
Otherwise,
2470+
if the document is in quirks mode
2471+
and the <i>current declaration's</i> name is on the <i>unitless length quirk list</i>,
2472+
<i>consume a primitive with the unitless length quirk</i>
2473+
and append the returned value
2474+
to the value of the <i>current declaration</i>.
2475+
Remain in this mode.
2476+
2477+
<p>
2478+
Otherwise,
2479+
<i>consume a primitive</i>
2480+
and append the returned value
2481+
to the value of the <i>current declaration</i>.
2482+
Remain in this mode.
24652483
</dl>
24662484

24672485

@@ -2584,6 +2602,62 @@ <h4>
25842602
<p>
25852603
Otherwise, return the <i>current input token</i>.
25862604

2605+
<h4>
2606+
<dfn>Consume a primitive with the hashless color quirk</dfn></h4>
2607+
2608+
<p>
2609+
This section describes how to <i>consume a primitive with the hashless color quirk</i>.
2610+
2611+
<p>
2612+
The <dfn>hashless color quirk list</dfn> contains the following properties:
2613+
2614+
<ul>
2615+
<li><p class='issue'>Fill this list.
2616+
</ul>
2617+
2618+
<p>
2619+
If the <i>current input token</i> is a number token,
2620+
let <var>value</var> be the token's representation.
2621+
If the <i>current input token</i> is a dimension token,
2622+
let <var>value</var> be the token's representation followed by the token's unit.
2623+
If the <i>current input token</i> is an identifier token,
2624+
let <var>value</var> be the token's value.
2625+
2626+
<p>
2627+
If <var>value</value> has a length of 3 or 6 and is composed solely of <i>hex digits</i>,
2628+
create a hash token with its value set to the <var>value</var>
2629+
and return it.
2630+
2631+
<p>
2632+
Otherwise,
2633+
<i>consume a primitive</i>
2634+
and return the returned value.
2635+
2636+
<h4>
2637+
<dfn>Consume a primitive with the unitless length quirk</dfn></h4>
2638+
2639+
<p>
2640+
This section describes how to <i>consume a primitive with the unitless length quirk</i>.
2641+
2642+
<p>
2643+
The <dfn>unitless length quirk list</dfn> contains the following properties:
2644+
2645+
<ul>
2646+
<li><p class='issue'>Fill this list.
2647+
</ul>
2648+
2649+
<p>
2650+
If the <i>current input token</i> is a number token,
2651+
create a dimension token with its value and representation set to the token's value and representation,
2652+
and its unit set to "px".
2653+
Return the dimension token.
2654+
2655+
<p>
2656+
Otherwise,
2657+
<i>consume a primitive</i>
2658+
and return the returned value.
2659+
2660+
25872661

25882662
<h4>
25892663
<dfn>Consume a simple block</dfn></h4>

0 commit comments

Comments
 (0)