Skip to content

Commit

Permalink
Spec the unitless length quirk
Browse files Browse the repository at this point in the history
  • Loading branch information
zcorpan committed Apr 25, 2013
1 parent 5ded343 commit 5c15baf
Show file tree
Hide file tree
Showing 2 changed files with 104 additions and 10 deletions.
57 changes: 52 additions & 5 deletions Overview.html
Expand Up @@ -162,7 +162,7 @@ <h3 id="dependencies"><span class="secno">2.3 </span>Dependencies</h3>

<p>The terms <dfn id="number-token">number token</dfn>, <dfn id="dimension-token">dimension token</dfn> and <dfn id="ident-token">ident token</dfn> are defined in CSS Syntax Module. <a href="#refsCSSSYNTAX">[CSSSYNTAX]</a>

<p>The term <dfn id="color">&lt;color&gt;</dfn> is defined in CSS Values and Units Module. <a href="#refsCSSVALUES">[CSSVALUES]</a>
<p>The terms <dfn id="color">&lt;color&gt;</dfn>, <dfn id="length">&lt;length&gt;</dfn> and <dfn id="number">number</dfn> are defined in CSS Values and Units Module. <a href="#refsCSSVALUES">[CSSVALUES]</a>

<p>Some terms are defined in DOM and HTML. <a href="#refsDOM">[DOM]</a> <a href="#refsHTML">[HTML]</a>

Expand All @@ -172,7 +172,7 @@ <h3 id="the-hashless-hex-color-quirk"><span class="secno">3.1 </span>The hashles

<p class="status not-tr">Status: Awaiting implementation feedback. Has <a href="http://w3c-test.org/quirks-mode/tests/js/hashless-hex-color.html">tests</a>.

<p>Quirky colors are denoted by <dfn id="quirky-color">&lt;quirky-color&gt;</dfn>. A <dfn id="quirky-color-0">quirky color</dfn> is a sequence of 3 or 6 characters in the range [0-9A-Fa-f] (U+0030 to U+0039, U+0041 to U+0046, U+0061 to U+0066) and correspond to a <a href="#number-token">number token</a>, a <a href="#dimension-token">dimension token</a> or an <a href="#ident-token">ident token</a> in the syntax. The value of a <a href="#quirky-color-0">quirky color</a> is obtained from the possible tokens as follows:
<p>Quirky colors are denoted by <dfn id="quirky-color">&lt;quirky-color&gt;</dfn>. A <dfn id="quirky-color-0">quirky color</dfn> is a sequence of 3 or 6 characters in the range [0-9A-Fa-f] (U+0030 to U+0039, U+0041 to U+0046, U+0061 to U+0066) and corresponds to a <a href="#number-token">number token</a>, a <a href="#dimension-token">dimension token</a> or an <a href="#ident-token">ident token</a> in the syntax. The value of a <a href="#quirky-color-0">quirky color</a> is obtained from the possible tokens as follows:

<dl class="switch">
<dt><a href="#number-token">number token</a>
Expand All @@ -197,7 +197,7 @@ <h3 id="the-hashless-hex-color-quirk"><span class="secno">3.1 </span>The hashles
<li>'color'
</ul>

<p>Any properties that reference the above properties in their "Value" grammar must not support <a href="#quirky-color">&lt;quirky-color&gt;</a>.
<p>Any properties not listed above that reference the above properties in their "Value" grammar must not support <a href="#quirky-color">&lt;quirky-color&gt;</a>.

<p>The <a href="#quirky-color">&lt;quirky-color&gt;</a> value must not be supported in arguments to CSS expressions.

Expand Down Expand Up @@ -286,10 +286,57 @@ <h3 id="the-hashless-hex-color-quirk"><span class="secno">3.1 </span>The hashles
-->

<h3 id="the-unitless-length-quirk"><span class="secno">3.2 </span>The unitless length quirk</h3>
<p class="XXX">...
<!--

<p class="status not-tr">Status: Awaiting implementation feedback. Has <a href="http://w3c-test.org/quirks-mode/tests/js/unitless-length.html">tests</a>.

<p>Quirky lengths are denoted by <dfn id="quirky-length">&lt;quirky-length&gt;</dfn>. A <dfn id="quirky-length-0">quirky length</dfn> is a <a href="#number">number</a> and corresponds to a <a href="#number-token">number token</a> in the syntax. The value of a <a href="#quirky-length-0">quirky length</a> is obtained from the token's value.

<p>The value of a <a href="#quirky-length-0">quirky length</a> must be interpreted as a <a href="#length">&lt;length&gt;</a> where the unit is '<code title="">px</code>'.

<p>In <a class="external" data-anolis-spec="dom" href="http://dom.spec.whatwg.org/#concept-document-quirks" title="concept-document-quirks">quirks mode</a>, the following properties must have their "Value" grammar changed by replacing <a href="#length">&lt;length&gt;</a> with [ <a href="#length">&lt;length&gt;</a> | <a href="#quirky-length">&lt;quirky-length&gt;</a> ]:

<ul class="brief">
<!--<li>'background-position'-->
<!--<li>'border-spacing'-->
<li>'border-top-width'
<li>'border-right-width'
<li>'border-bottom-width'
<li>'border-left-width'
<li>'border-width'
<li>'bottom'
<li>'clip'
<li>'font-size'
<!--<li class=XXX>'font'-->
<li>'height'
<li>'left'
<li>'letter-spacing'
<li>'margin-right'
<li>'margin-left'
<li>'margin-top'
<li>'margin-bottom'
<li>'margin'
<!--<li>'max-height'-->
<!--<li>'max-width'-->
<!--<li>'min-height'-->
<!--<li>'min-width'-->
<li>'padding-top'
<li>'padding-right'
<li>'padding-bottom'
<li>'padding-left'
<li>'padding'
<li>'right'
<!--<li>'text-indent'-->
<li>'top'
<!--<li>'vertical-align'-->
<li>'width'
<li>'word-spacing'
</ul>

<p>Any properties not listed above that reference the above properties in their "Value" grammar must not support <a href="#quirky-length">&lt;quirky-length&gt;</a>.

<p>The <a href="#quirky-length">&lt;quirky-length&gt;</a> value must not be supported in arguments to CSS expressions other than the <code title="">rect()</code> expression.

<!--
<p>When a property is said to <dfn>support unitless lengths</dfn>, all tokens in the property's value <var>tokens</var> must be replaced with the return value of following algorithm prior to interpretation:
<ol>
Expand Down
57 changes: 52 additions & 5 deletions Overview.src.html
Expand Up @@ -170,7 +170,7 @@ <h3>Dependencies</h3>

<p>The terms <dfn>number token</dfn>, <dfn>dimension token</dfn> and <dfn>ident token</dfn> are defined in CSS Syntax Module. <span data-anolis-ref>CSSSYNTAX</span>

<p>The term <dfn>&lt;color></dfn> is defined in CSS Values and Units Module. <span data-anolis-ref>CSSVALUES</span>
<p>The terms <dfn>&lt;color></dfn>, <dfn>&lt;length></dfn> and <dfn>number</dfn> are defined in CSS Values and Units Module. <span data-anolis-ref>CSSVALUES</span>

<p>Some terms are defined in DOM and HTML. <span data-anolis-ref>DOM</span> <span data-anolis-ref>HTML</span>

Expand All @@ -180,7 +180,7 @@ <h3>The hashless hex color quirk</h3>

<p class="status not-tr">Status: Awaiting implementation feedback. Has <a href="http://w3c-test.org/quirks-mode/tests/js/hashless-hex-color.html">tests</a>.

<p>Quirky colors are denoted by <dfn>&lt;quirky-color></dfn>. A <dfn>quirky color</dfn> is a sequence of 3 or 6 characters in the range [0-9A-Fa-f] (U+0030 to U+0039, U+0041 to U+0046, U+0061 to U+0066) and correspond to a <span>number token</span>, a <span>dimension token</span> or an <span>ident token</span> in the syntax. The value of a <span>quirky color</span> is obtained from the possible tokens as follows:
<p>Quirky colors are denoted by <dfn>&lt;quirky-color></dfn>. A <dfn>quirky color</dfn> is a sequence of 3 or 6 characters in the range [0-9A-Fa-f] (U+0030 to U+0039, U+0041 to U+0046, U+0061 to U+0066) and corresponds to a <span>number token</span>, a <span>dimension token</span> or an <span>ident token</span> in the syntax. The value of a <span>quirky color</span> is obtained from the possible tokens as follows:

<dl class=switch>
<dt><span>number token</span>
Expand All @@ -205,7 +205,7 @@ <h3>The hashless hex color quirk</h3>
<li>'color'
</ul>

<p>Any properties that reference the above properties in their "Value" grammar must not support <span>&lt;quirky-color></span>.
<p>Any properties not listed above that reference the above properties in their "Value" grammar must not support <span>&lt;quirky-color></span>.

<p>The <span>&lt;quirky-color></span> value must not be supported in arguments to CSS expressions.

Expand Down Expand Up @@ -294,10 +294,57 @@ <h3>The hashless hex color quirk</h3>
-->

<h3>The unitless length quirk</h3>
<p class=XXX>...
<!--

<p class="status not-tr">Status: Awaiting implementation feedback. Has <a href="http://w3c-test.org/quirks-mode/tests/js/unitless-length.html">tests</a>.

<p>Quirky lengths are denoted by <dfn>&lt;quirky-length></dfn>. A <dfn>quirky length</dfn> is a <span>number</span> and corresponds to a <span>number token</span> in the syntax. The value of a <span>quirky length</span> is obtained from the token's value.

<p>The value of a <span>quirky length</span> must be interpreted as a <span>&lt;length></span> where the unit is '<code title>px</code>'.

<p>In <span data-anolis-spec=dom title=concept-document-quirks>quirks mode</span>, the following properties must have their "Value" grammar changed by replacing <span>&lt;length></span> with [ <span>&lt;length></span> | <span>&lt;quirky-length></span> ]:

<ul class=brief>
<!--<li>'background-position'-->
<!--<li>'border-spacing'-->
<li>'border-top-width'
<li>'border-right-width'
<li>'border-bottom-width'
<li>'border-left-width'
<li>'border-width'
<li>'bottom'
<li>'clip'
<li>'font-size'
<!--<li class=XXX>'font'-->
<li>'height'
<li>'left'
<li>'letter-spacing'
<li>'margin-right'
<li>'margin-left'
<li>'margin-top'
<li>'margin-bottom'
<li>'margin'
<!--<li>'max-height'-->
<!--<li>'max-width'-->
<!--<li>'min-height'-->
<!--<li>'min-width'-->
<li>'padding-top'
<li>'padding-right'
<li>'padding-bottom'
<li>'padding-left'
<li>'padding'
<li>'right'
<!--<li>'text-indent'-->
<li>'top'
<!--<li>'vertical-align'-->
<li>'width'
<li>'word-spacing'
</ul>

<p>Any properties not listed above that reference the above properties in their "Value" grammar must not support <span>&lt;quirky-length></span>.

<p>The <span>&lt;quirky-length></span> value must not be supported in arguments to CSS expressions other than the <code title>rect()</code> expression.

<!--
<p>When a property is said to <dfn>support unitless lengths</dfn>, all tokens in the property's value <var>tokens</var> must be replaced with the return value of following algorithm prior to interpretation:
<ol>
Expand Down

0 comments on commit 5c15baf

Please sign in to comment.