Skip to content

Commit a6139ef

Browse files
committed
[css-syntax] Remove the parsing quirks. The Quirks Mode spec now handles them at the value level instead.
1 parent 2c40f0c commit a6139ef

2 files changed

Lines changed: 10 additions & 286 deletions

File tree

css-syntax/Overview.html

Lines changed: 8 additions & 171 deletions
Original file line numberDiff line numberDiff line change
@@ -339,18 +339,10 @@ <h2 class="no-num no-toc" id=contents> Table of contents</h2>
339339
<li><a href="#consume-a-component-value"><span class=secno>5.5.6.
340340
</span> Consume a component value</a>
341341

342-
<li><a href="#consume-a-component-value-with-the-hashl"><span
343-
class=secno>5.5.7. </span> Consume a component value with the
344-
hashless color quirk</a>
345-
346-
<li><a href="#consume-a-component-value-with-the-unitl"><span
347-
class=secno>5.5.8. </span> Consume a component value with the
348-
unitless length quirk</a>
349-
350-
<li><a href="#consume-a-simple-block"><span class=secno>5.5.9. </span>
342+
<li><a href="#consume-a-simple-block"><span class=secno>5.5.7. </span>
351343
Consume a simple block</a>
352344

353-
<li><a href="#consume-a-function"><span class=secno>5.5.10. </span>
345+
<li><a href="#consume-a-function"><span class=secno>5.5.8. </span>
354346
Consume a function</a>
355347
</ul>
356348

@@ -3613,17 +3605,7 @@ <h3 id=parser-diagrams><span class=secno>5.1. </span> Parser Railroad
36133605

36143606
<h3 id=parser-flags><span class=secno>5.2. </span> Parser Flags</h3>
36153607

3616-
<dl>
3617-
<dt>the <dfn id=quirks-mode>quirks mode</dfn> flag
3618-
3619-
<dd> This flag is set when the host document is in quirks mode. When this
3620-
is set, the parser allows <a
3621-
href="#consume-a-component value-with-the-hashless-co">hash colors
3622-
without the # character</a> and <a
3623-
href="#consume-a-component value-with-the-unitless-le">pixel lengths
3624-
without the ‘<code class=property>px</code>’ unit</a> in some
3625-
circumstances.
3626-
</dl>
3608+
<p> No flags currently.
36273609

36283610
<h3 id=definitions0><span class=secno>5.3. </span> Definitions</h3>
36293611

@@ -4158,118 +4140,7 @@ <h4 id=consume-a-component-value><span class=secno>5.5.6. </span> <dfn
41584140
<p> Otherwise, return the <a href="#current-input-token"><i>current input
41594141
token</i></a>.
41604142

4161-
<h4 id=consume-a-component-value-with-the-hashl><span class=secno>5.5.7.
4162-
</span> <dfn id=consume-a-component-value-with-the-hashl0>Consume a
4163-
component value with the hashless color quirk</dfn></h4>
4164-
4165-
<p> This section describes how to <a
4166-
href="#consume-a-component-value-with-the-hashl0"><i>consume a component
4167-
value with the hashless color quirk</i></a>.
4168-
4169-
<p> The <dfn id=hashless-color-quirk-list>hashless color quirk list</dfn>
4170-
contains the following property names:
4171-
4172-
<ul>
4173-
<li><code class=property>background-color</code>
4174-
4175-
<li><code class=property>border-color</code>
4176-
4177-
<li><code class=property>border-top-color</code>
4178-
4179-
<li><code class=property>border-right-color</code>
4180-
4181-
<li><code class=property>border-bottom-color</code>
4182-
4183-
<li><code class=property>border-left-color</code>
4184-
4185-
<li><code class=property>color</code>
4186-
</ul>
4187-
4188-
<p> If the <a href="#current-input-token"><i>current input token</i></a> is
4189-
a number token, let <var>value</var> be the token's representation. If the
4190-
<a href="#current-input-token"><i>current input token</i></a> is a
4191-
dimension token, let <var>value</var> be the token's representation
4192-
followed by the token's unit. If the <a
4193-
href="#current-input-token"><i>current input token</i></a> is an ident
4194-
token, let <var>value</var> be the token's value.
4195-
4196-
<p> If <var>value</var> has a length of 3 or 6 and is composed solely of <a
4197-
href="#hex-digit"><i>hex digits</i></a>, create a hash token with its
4198-
value set to the <var>value</var> and return it.
4199-
4200-
<p> Otherwise, <a href="#consume-a-component-value0"><i>consume a component
4201-
value</i></a> and return the returned value.
4202-
4203-
<h4 id=consume-a-component-value-with-the-unitl><span class=secno>5.5.8.
4204-
</span> <dfn id=consume-a-component-value-with-the-unitl0>Consume a
4205-
component value with the unitless length quirk</dfn></h4>
4206-
4207-
<p> This section describes how to <a
4208-
href="#consume-a-component-value-with-the-unitl0"><i>consume a component
4209-
value with the unitless length quirk</i></a>.
4210-
4211-
<p> The <dfn id=unitless-length-quirk-list>unitless length quirk list</dfn>
4212-
contains the following property names:
4213-
4214-
<ul>
4215-
<li><code class=property>border-top-width</code>
4216-
4217-
<li><code class=property>border-right-width</code>
4218-
4219-
<li><code class=property>border-bottom-width</code>
4220-
4221-
<li><code class=property>border-left-width</code>
4222-
4223-
<li><code class=property>border-width</code>
4224-
4225-
<li><code class=property>bottom</code>
4226-
4227-
<li><code class=property>font-size</code>
4228-
4229-
<li><code class=property>height</code>
4230-
4231-
<li><code class=property>left</code>
4232-
4233-
<li><code class=property>letter-spacing</code>
4234-
4235-
<li><code class=property>margin</code>
4236-
4237-
<li><code class=property>margin-right</code>
4238-
4239-
<li><code class=property>margin-left</code>
4240-
4241-
<li><code class=property>margin-top</code>
4242-
4243-
<li><code class=property>margin-bottom</code>
4244-
4245-
<li><code class=property>padding</code>
4246-
4247-
<li><code class=property>padding-top</code>
4248-
4249-
<li><code class=property>padding-right</code>
4250-
4251-
<li><code class=property>padding-bottom</code>
4252-
4253-
<li><code class=property>padding-left</code>
4254-
4255-
<li><code class=property>right</code>
4256-
4257-
<li><code class=property>top</code>
4258-
4259-
<li><code class=property>width</code>
4260-
4261-
<li><code class=property>word-spacing</code>
4262-
</ul>
4263-
4264-
<p> If the <a href="#current-input-token"><i>current input token</i></a> is
4265-
a number token, create a dimension token with its value and representation
4266-
set to the token's value and representation, and its unit set to "px".
4267-
Return the dimension token.
4268-
4269-
<p> Otherwise, <a href="#consume-a-component-value0"><i>consume a component
4270-
value</i></a> and return the returned value.
4271-
4272-
<h4 id=consume-a-simple-block><span class=secno>5.5.9. </span> <dfn
4143+
<h4 id=consume-a-simple-block><span class=secno>5.5.7. </span> <dfn
42734144
id=consume-a-simple-block0>Consume a simple block</dfn></h4>
42744145

42754146
<p> This section describes how to <a
@@ -4299,7 +4170,7 @@ <h4 id=consume-a-simple-block><span class=secno>5.5.9. </span> <dfn
42994170
value</i></a> and append it to the value of the block.
43004171
</dl>
43014172

4302-
<h4 id=consume-a-function><span class=secno>5.5.10. </span> <dfn
4173+
<h4 id=consume-a-function><span class=secno>5.5.8. </span> <dfn
43034174
id=consume-a-function0>Consume a function</dfn></h4>
43044175

43054176
<p> This section describes how to <a href="#consume-a-function0"><i>consume
@@ -4319,20 +4190,6 @@ <h4 id=consume-a-function><span class=secno>5.5.10. </span> <dfn
43194190

43204191
<dd> Return the function.
43214192

4322-
<dt>number token
4323-
4324-
<dd> If the <a href="#quirks-mode"><i>quirks mode</i></a> flag is set, and
4325-
the function's name is as <a href="#ascii-case-insensitive"><i>ASCII
4326-
case-insensitive</i></a> match with "rect", <a
4327-
href="#consume-a-component-value-with-the-unitl0"><i>consume a component
4328-
value with the unitless length quirk</i></a>. If anything was returned,
4329-
append the returned value to the value of the <i>current argument</i>;
4330-
otherwise, set the <var>valid</var> flag to false.
4331-
<p> Otherwise, <a href="#consume-a-component-value0"><i>consume a
4332-
component value</i></a>. If anything was returned, append the returned
4333-
value to the value of the <i>current argument</i>; otherwise, set the
4334-
<var>valid</var> flag to false.
4335-
43364193
<dt>anything else
43374194

43384195
<dd> <a href="#consume-a-component-value0"><i>Consume a component
@@ -4366,9 +4223,6 @@ <h3 id=changes-from-css-2.1-core-grammar><span class=secno>5.6. </span>
43664223

43674224
<li> Selectors and at-rule preludes can now contain at-keywords
43684225
</ul>
4369-
4370-
<li> Quirks mode parsing differences are now officially recognized in the
4371-
parser.
43724226
</ol>
43734227

43744228
<h2 id=serialization><span class=secno>6. </span>Serialization</h2>
@@ -4610,19 +4464,11 @@ <h2 class=no-num id=index> Index</h2>
46104464
<li>Consume a component value, <a href="#consume-a-component-value0"
46114465
title="section 5.5.6."><strong>5.5.6.</strong></a>
46124466

4613-
<li>Consume a component value with the hashless color quirk, <a
4614-
href="#consume-a-component-value-with-the-hashl0"
4615-
title="section 5.5.7."><strong>5.5.7.</strong></a>
4616-
4617-
<li>Consume a component value with the unitless length quirk, <a
4618-
href="#consume-a-component-value-with-the-unitl0"
4619-
title="section 5.5.8."><strong>5.5.8.</strong></a>
4620-
46214467
<li>Consume a declaration, <a href="#consume-a-declaration0"
46224468
title="section 5.5.5."><strong>5.5.5.</strong></a>
46234469

46244470
<li>Consume a function, <a href="#consume-a-function0"
4625-
title="section 5.5.10."><strong>5.5.10.</strong></a>
4471+
title="section 5.5.8."><strong>5.5.8.</strong></a>
46264472

46274473
<li>Consume a list of declarations, <a
46284474
href="#consume-a-list-of-declarations0"
@@ -4641,7 +4487,7 @@ <h2 class=no-num id=index> Index</h2>
46414487
title="section 5.5.3."><strong>5.5.3.</strong></a>
46424488

46434489
<li>Consume a simple block, <a href="#consume-a-simple-block0"
4644-
title="section 5.5.9."><strong>5.5.9.</strong></a>
4490+
title="section 5.5.7."><strong>5.5.7.</strong></a>
46454491

46464492
<li>current input character, <a href="#current-input-character"
46474493
title="section 4.3."><strong>4.3.</strong></a>
@@ -4667,7 +4513,7 @@ <h2 class=no-num id=index> Index</h2>
46674513
title="section 4.4.2."><strong>4.4.2.</strong></a>
46684514

46694515
<li>ending token, <a href="#ending-token"
4670-
title="section 5.5.9."><strong>5.5.9.</strong></a>
4516+
title="section 5.5.7."><strong>5.5.7.</strong></a>
46714517

46724518
<li>end of the range, <a href="#end-of-the-range"
46734519
title="section 4.6."><strong>4.6.</strong></a>
@@ -4684,9 +4530,6 @@ <h2 class=no-num id=index> Index</h2>
46844530
<li>get an encoding, <a href="#get-an-encoding"
46854531
title="section 3.2."><strong>3.2.</strong></a>
46864532

4687-
<li>hashless color quirk list, <a href="#hashless-color-quirk-list"
4688-
title="section 5.5.7."><strong>5.5.7.</strong></a>
4689-
46904533
<li>Hash-rest state, <a href="#hash-rest-state0"
46914534
title="section 4.4.5."><strong>4.4.5.</strong></a>
46924535

@@ -4774,9 +4617,6 @@ <h2 class=no-num id=index> Index</h2>
47744617
title="section 2."><strong>2.</strong></a>, <a href="#qualified-rule0"
47754618
title="section 5."><strong>5.</strong></a>
47764619

4777-
<li>quirks mode, <a href="#quirks-mode"
4778-
title="section 5.2."><strong>5.2.</strong></a>
4779-
47804620
<li>recognized at-rule name, <a href="#recognized-at-rule-name"
47814621
title="section 5."><strong>5.</strong></a>
47824622

@@ -4844,9 +4684,6 @@ <h2 class=no-num id=index> Index</h2>
48444684
<li>Unicode-range state, <a href="#unicode-range-state0"
48454685
title="section 4.4.23."><strong>4.4.23.</strong></a>
48464686

4847-
<li>unitless length quirk list, <a href="#unitless-length-quirk-list"
4848-
title="section 5.5.8."><strong>5.5.8.</strong></a>
4849-
48504687
<li>uppercase letter, <a href="#uppercase-letter"
48514688
title="section 4.3."><strong>4.3.</strong></a>
48524689

0 commit comments

Comments
 (0)