Skip to content

Commit 01cdeed

Browse files
author
Simon Pieters
committed
[cssom] The last decl doesn't win in case of \!important. <http://www.w3.org/mid/52089124.1070906@exyr.org>
1 parent f769473 commit 01cdeed

2 files changed

Lines changed: 23 additions & 22 deletions

File tree

cssom/Overview.html

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<h1>CSS Object Model (CSSOM)</h1>
1717

1818

19-
<h2 class="no-num no-toc" id="w3c-doctype">Editor's Draft 9 August 2013</h2>
19+
<h2 class="no-num no-toc" id="w3c-doctype">Editor's Draft 12 August 2013</h2>
2020

2121
<dl>
2222

@@ -90,7 +90,7 @@ <h2 class="no-num no-toc" id="sotd">Status of This Document</h2>
9090
can be found in the
9191
<a href="http://www.w3.org/TR/">W3C technical reports index at http://www.w3.org/TR/.</a></em>
9292

93-
<p class="dontpublish">This is the 9 August 2013 Editor's Draft of CSSOM. Please send comments to
93+
<p class="dontpublish">This is the 12 August 2013 Editor's Draft of CSSOM. Please send comments to
9494
<a href="mailto:www-style@w3.org?subject=%5Bcssom%5D%20">www-style@w3.org</a>
9595
(<a href="http://lists.w3.org/Archives/Public/www-style/">archived</a>)
9696
with <samp>[cssom]</samp> at the start of the subject line.
@@ -1959,11 +1959,12 @@ <h4 id="the-cssstylerule-interface"><span class="secno">6.4.3 </span>The <code t
19591959
</ol>
19601960

19611961
<p>The <dfn id="dom-cssstylerule-style" title="dom-CSSStyleRule-style"><code>style</code></dfn> attribute must return a <code><a href="#cssstyledeclaration">CSSStyleDeclaration</a></code> object for the style rule, with the
1962-
<a href="#concept-css-declaration-block-declarations" title="concept-css-declaration-block-declarations">declarations</a> being the declared declarations in the rule, in the same order as they were
1963-
specified, with shorthand properties expanded into their longhand properties, in canonical order. If a property is specified more than once, it must be
1964-
represented as one item in the <a href="#concept-css-declaration-block-declarations" title="concept-css-declaration-block-declarations">declarations</a> at the position of the last declaration for that
1965-
property.</p>
1962+
<a href="#concept-css-declaration-block-declarations" title="concept-css-declaration-block-declarations">declarations</a> being the declared declarations in the rule, in
1963+
<a href="#concept-declarations-specified-order" title="concept-declarations-specified-order">specified order</a>.</p>
19661964

1965+
<p>The <dfn id="concept-declarations-specified-order" title="concept-declarations-specified-order">specified order</dfn> for declarations is the same as specified, but with shorthand properties
1966+
expanded into their longhand properties, in canonical order. If a property is specified more than once (after shorthand expansion), only the
1967+
one with greatest cascading order must be represented, at the same relative position as it was specified. <a href="#refsCSSCASCADE">[CSSCASCADE]</a>
19671968

19681969
<h4 id="the-csscharsetrule-interface"><span class="secno">6.4.4 </span>The <code title="">CSSCharsetRule</code> Interface</h4>
19691970

@@ -2231,9 +2232,8 @@ <h4 id="the-cssstyledeclaration-interface"><span class="secno">6.5.1 </span>The
22312232
a <code class="external" data-anolis-spec="dom"><a href="http://dom.spec.whatwg.org/#nomodificationallowederror">NoModificationAllowedError</a></code> exception and terminate these steps.</li>
22322233
<li><p>Empty the <a href="#concept-css-declaration-block-declarations" title="concept-css-declaration-block-declarations">declarations</a>.</li>
22332234
<li><p><a href="#parse-a-css-declaration-block" title="Parse a CSS declaration block">Parse</a> the given value and, if the return value is not the empty list, insert the items in the list
2234-
into the <a href="#concept-css-declaration-block-declarations" title="concept-css-declaration-block-declarations">declarations</a>, in the same order as they were specified, with shorthand properties
2235-
expanded into their longhand properties, in canonical order. If a property is specified more than once, it must be represented as one item in the
2236-
<a href="#concept-css-declaration-block-declarations" title="concept-css-declaration-block-declarations">declarations</a> at the position of the last declaration for that property.</li>
2235+
into the <a href="#concept-css-declaration-block-declarations" title="concept-css-declaration-block-declarations">declarations</a>, in <a href="#concept-declarations-specified-order" title="concept-declarations-specified-order">specified
2236+
order</a>.</li>
22372237
</ol>
22382238

22392239
<p>The <dfn id="dom-cssstyledeclaration-length" title="dom-CSSStyleDeclaration-length"><code>length</code></dfn> attribute must return the number of declarations in the
@@ -2731,9 +2731,7 @@ <h3 id="the-elementcssinlinestyle-interface"><span class="secno">7.1 </span>The
27312731

27322732
<p>The <dfn id="dom-elementcssinlinestyle-style" title="dom-ElementCSSInlineStyle-style"><code>style</code></dfn> attribute must return a <a href="#css-declaration-block">CSS declaration block</a> with the
27332733
<a href="#concept-css-declaration-block-declarations" title="concept-css-declaration-block-declarations">declarations</a> being set to the result of <a href="#parse-a-css-declaration-block" title="Parse a CSS declaration block">parsing</a>
2734-
the <code title="">style</code> content attribute, in the same order as specified, with shorthand properties expanded to their longhand properties, in canonical
2735-
order. If a property is specified more than once, it must be represented as one item in the
2736-
<a href="#concept-css-declaration-block-declarations" title="concept-css-declaration-block-declarations">declarations</a> at the position of the last declaration for that property. If the
2734+
the <code title="">style</code> content attribute, in <a href="#concept-declarations-specified-order" title="concept-declarations-specified-order">specified order</a>. If the
27372735
<code title="">style</code> content attribute is absent, the object represents an empty list of
27382736
declarations. Mutating the <code><a href="#cssstyledeclaration">CSSStyleDeclaration</a></code> object must set the
27392737
<code title="">style</code> content attribute on the element to the
@@ -2988,6 +2986,9 @@ <h2 class="no-num" id="references">References</h2>
29882986
<div id="anolis-references"><dl><dt id="refsCSS">[CSS]
29892987
<dd><cite><a href="http://www.w3.org/TR/CSS2/">CSS</a></cite>, Bert Bos, Tantek Çelik, Ian Hickson et al.. W3C.
29902988

2989+
<dt id="refsCSSCASCADE">[CSSCASCADE]
2990+
<dd><cite><a href="http://dev.w3.org/csswg/css-cascade/">CSS Cascading and Inheritance</a></cite>, Håkon Wium Lie, fantasai and Tab Atkins Jr..
2991+
29912992
<dt id="refsCSSNAMESPACES">[CSSNAMESPACES]
29922993
<dd><cite><a href="http://dev.w3.org/csswg/css-namespaces/">CSS Namespaces Module</a></cite>, Elika J. Etemad and Anne van Kesteren. W3C.
29932994

@@ -3065,6 +3066,7 @@ <h2 class="no-num" id="acknowledgments">Acknowledgments</h2>
30653066
Øyvind Stenhaug,
30663067
Philip Taylor,
30673068
Robert O'Callahan,
3069+
Simon Sapin,
30683070
Sjoerd Visscher,
30693071
<!--Simon Pieters,-->
30703072
Sylvain Galineau,

cssom/Overview.src.html

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1881,11 +1881,12 @@ <h4>The <code title>CSSStyleRule</code> Interface</h4>
18811881
</ol>
18821882

18831883
<p>The <dfn title=dom-CSSStyleRule-style><code>style</code></dfn> attribute must return a <code>CSSStyleDeclaration</code> object for the style rule, with the
1884-
<span title=concept-css-declaration-block-declarations>declarations</span> being the declared declarations in the rule, in the same order as they were
1885-
specified, with shorthand properties expanded into their longhand properties, in canonical order. If a property is specified more than once, it must be
1886-
represented as one item in the <span title=concept-css-declaration-block-declarations>declarations</span> at the position of the last declaration for that
1887-
property.</p>
1884+
<span title=concept-css-declaration-block-declarations>declarations</span> being the declared declarations in the rule, in
1885+
<span title=concept-declarations-specified-order>specified order</span>.</p>
18881886

1887+
<p>The <dfn title=concept-declarations-specified-order>specified order</dfn> for declarations is the same as specified, but with shorthand properties
1888+
expanded into their longhand properties, in canonical order. If a property is specified more than once (after shorthand expansion), only the
1889+
one with greatest cascading order must be represented, at the same relative position as it was specified. <span data-anolis-ref>CSSCASCADE</span>
18891890

18901891
<h4>The <code title>CSSCharsetRule</code> Interface</h4>
18911892

@@ -2153,9 +2154,8 @@ <h4>The <code title>CSSStyleDeclaration</code> Interface</h4>
21532154
a <code data-anolis-spec=dom>NoModificationAllowedError</code> exception and terminate these steps.</li>
21542155
<li><p>Empty the <span title=concept-css-declaration-block-declarations>declarations</span>.</li>
21552156
<li><p><span title='Parse a CSS declaration block'>Parse</span> the given value and, if the return value is not the empty list, insert the items in the list
2156-
into the <span title=concept-css-declaration-block-declarations>declarations</span>, in the same order as they were specified, with shorthand properties
2157-
expanded into their longhand properties, in canonical order. If a property is specified more than once, it must be represented as one item in the
2158-
<span title=concept-css-declaration-block-declarations>declarations</span> at the position of the last declaration for that property.</p></li>
2157+
into the <span title=concept-css-declaration-block-declarations>declarations</span>, in <span title=concept-declarations-specified-order>specified
2158+
order</span>.</p></li>
21592159
</ol>
21602160

21612161
<p>The <dfn title=dom-CSSStyleDeclaration-length><code>length</code></dfn> attribute must return the number of declarations in the
@@ -2653,9 +2653,7 @@ <h3>The <code>ElementCSSInlineStyle</code> Interface</h3>
26532653

26542654
<p>The <dfn title=dom-ElementCSSInlineStyle-style><code>style</code></dfn> attribute must return a <span>CSS declaration block</span> with the
26552655
<span title=concept-css-declaration-block-declarations>declarations</span> being set to the result of <span title='Parse a CSS declaration block'>parsing</span>
2656-
the <code title>style</code> content attribute, in the same order as specified, with shorthand properties expanded to their longhand properties, in canonical
2657-
order. If a property is specified more than once, it must be represented as one item in the
2658-
<span title=concept-css-declaration-block-declarations>declarations</span> at the position of the last declaration for that property. If the
2656+
the <code title>style</code> content attribute, in <span title=concept-declarations-specified-order>specified order</span>. If the
26592657
<code title>style</code> content attribute is absent, the object represents an empty list of
26602658
declarations. Mutating the <code>CSSStyleDeclaration</code> object must set the
26612659
<code title>style</code> content attribute on the element to the
@@ -2942,6 +2940,7 @@ <h2 class="no-num">Acknowledgments</h2>
29422940
Øyvind Stenhaug,
29432941
Philip Taylor,
29442942
Robert O'Callahan,
2943+
Simon Sapin,
29452944
Sjoerd Visscher,
29462945
<!--Simon Pieters,-->
29472946
Sylvain Galineau,

0 commit comments

Comments
 (0)