Skip to content

Commit 067798d

Browse files
author
Simon Pieters
committed
[cssom] Hardcode 'important' so that it's at least well-defined.
1 parent 7802a81 commit 067798d

2 files changed

Lines changed: 18 additions & 18 deletions

File tree

cssom/Overview.html

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2124,14 +2124,13 @@ <h4 id="the-cssstyledeclaration-interface"><span class="secno">6.5.1 </span>The
21242124
<ol>
21252125
<li><p>If <var>property</var> is an <a class="external" href="http://dom.spec.whatwg.org/#ascii-case-insensitive">ASCII
21262126
case-insensitive</a> match for a property of a declaration in the <a href="#css-declaration-block-declarations">CSS
2127-
declaration block declarations</a> that has a priority, and that declaration's
2128-
property is defined to be case-insensitive, return the canonical priority of that
2129-
property as given in the syntax definition.</p>
2127+
declaration block declarations</a> that has the <i title="">important</i> flag set, and that declaration's
2128+
property is defined to be case-insensitive, return the string "<code title="">important</code>".</p>
21302129
<li><p>If <var>property</var> is a
21312130
<a class="external" href="http://dom.spec.whatwg.org/#case-sensitive">case-sensitive</a> match for a property of a
2132-
declaration in the <a href="#css-declaration-block-declarations">CSS declaration block declarations</a> that has a
2133-
priority, and that declaration's property is defined to be case-sensitive, return
2134-
the canonical priority of that property as given in the syntax definition.</p>
2131+
declaration in the <a href="#css-declaration-block-declarations">CSS declaration block declarations</a> that has the
2132+
<i title="">important</i> flag set, and that declaration's property is defined to be case-sensitive, return
2133+
the string "<code title="">important</code>".</p>
21352134
<li><p>Return the empty string.
21362135
</ol>
21372136
<p class="example">E.g. for <code>background-color:lime !IMPORTANT</code> the return
@@ -2147,13 +2146,14 @@ <h4 id="the-cssstyledeclaration-interface"><span class="secno">6.5.1 </span>The
21472146
terminate this algorithm.</li>
21482147
<li><p>If <var>value</var> is the empty string, invoke <code title="dom-CSSStyleDeclaration-removeProperty"><a href="#dom-cssstyledeclaration-removeproperty">removeProperty()</a></code>
21492148
with <var>property</var> as argument and terminate this algorithm.</li>
2150-
<li><p>If <var>priority</var> is neither a valid priority nor the empty string terminate this algorithm.</li>
2149+
<li><p>If <var>priority</var> is neither an <a class="external" href="http://dom.spec.whatwg.org/#ascii-case-insensitive">ASCII case-insensitive</a> match for the string "<code title="">important</code>" nor
2150+
the empty string terminate this algorithm.</li>
21512151
<li>
21522152
<p>If <a href="#parse-a-css-value" title="parse a CSS value">parsing the <var>value</var></a> returns <code>null</code> terminate this algorithm.
21532153
<p class="note"><var>value</var> can not include '<code>!important</code>'.</p>
21542154
</li>
2155-
<li><p>Finally, set <var>property</var> to <var>value</var> with priority <var>priority</var> when <var>priority</var>
2156-
is not the empty string. Otherwise set <var>property</var> to <var>value</var>.</li>
2155+
<li><p>Finally, set <var>property</var> to <var>value</var> with the <i title="">important</i> flag set if <var title="">priority</var> is not the empty string, and
2156+
unset otherwise.</li>
21572157
</ol>
21582158

21592159
<p>The <dfn id="dom-cssstyledeclaration-removeproperty" title="dom-CSSStyleDeclaration-removeProperty"><code>removeProperty(<var>property</var>)</code></dfn> method must run these steps:</p>

cssom/Overview.src.html

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2054,14 +2054,13 @@ <h4>The <code title>CSSStyleDeclaration</code> Interface</h4>
20542054
<ol>
20552055
<li><p>If <var>property</var> is an <span data-anolis-spec=dom>ASCII
20562056
case-insensitive</span> match for a property of a declaration in the <span>CSS
2057-
declaration block declarations</span> that has a priority, and that declaration's
2058-
property is defined to be case-insensitive, return the canonical priority of that
2059-
property as given in the syntax definition.</p>
2057+
declaration block declarations</span> that has the <i title>important</i> flag set, and that declaration's
2058+
property is defined to be case-insensitive, return the string "<code title>important</code>".</p>
20602059
<li><p>If <var>property</var> is a
20612060
<span data-anolis-spec=dom>case-sensitive</span> match for a property of a
2062-
declaration in the <span>CSS declaration block declarations</span> that has a
2063-
priority, and that declaration's property is defined to be case-sensitive, return
2064-
the canonical priority of that property as given in the syntax definition.</p>
2061+
declaration in the <span>CSS declaration block declarations</span> that has the
2062+
<i title>important</i> flag set, and that declaration's property is defined to be case-sensitive, return
2063+
the string "<code title>important</code>".</p>
20652064
<li><p>Return the empty string.
20662065
</ol>
20672066
<p class='example'>E.g. for <code>background-color:lime !IMPORTANT</code> the return
@@ -2077,13 +2076,14 @@ <h4>The <code title>CSSStyleDeclaration</code> Interface</h4>
20772076
terminate this algorithm.</p></li>
20782077
<li><p>If <var>value</var> is the empty string, invoke <code title='dom-CSSStyleDeclaration-removeProperty'>removeProperty()</code>
20792078
with <var>property</var> as argument and terminate this algorithm.</p></li>
2080-
<li><p>If <var>priority</var> is neither a valid priority nor the empty string terminate this algorithm.</p></li>
2079+
<li><p>If <var>priority</var> is neither an <span data-anolis-spec=dom>ASCII case-insensitive</span> match for the string "<code title>important</code>" nor
2080+
the empty string terminate this algorithm.</p></li>
20812081
<li>
20822082
<p>If <span title='parse a CSS value'>parsing the <var>value</var></span> returns <code>null</code> terminate this algorithm.
20832083
<p class='note'><var>value</var> can not include '<code>!important</code>'.</p>
20842084
</li>
2085-
<li><p>Finally, set <var>property</var> to <var>value</var> with priority <var>priority</var> when <var>priority</var>
2086-
is not the empty string. Otherwise set <var>property</var> to <var>value</var>.</p></li>
2085+
<li><p>Finally, set <var>property</var> to <var>value</var> with the <i title>important</i> flag set if <var title>priority</var> is not the empty string, and
2086+
unset otherwise.</p></li>
20872087
</ol>
20882088

20892089
<p>The <dfn title=dom-CSSStyleDeclaration-removeProperty><code>removeProperty(<var>property</var>)</code></dfn> method must run these steps:</p>

0 commit comments

Comments
 (0)