You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<var>priority</var>)</code></dfn> method must run these steps:</p>
2248
2248
<ol>
2249
-
<!-- XXX handle shorthands better -->
2250
2249
<li><p>If the <ahref="#concept-css-declaration-block-readonly-flag" title="concept-css-declaration-block-readonly-flag">readonly flag</a> is set, <aclass="external" data-anolis-spec="dom" href="http://dom.spec.whatwg.org/#concept-throw" title="concept-throw">throw</a>
2251
2250
an <codeclass="external" data-anolis-spec="dom"><ahref="http://dom.spec.whatwg.org/#nomodificationallowederror">NoModificationAllowedError</a></code> exception and terminate these steps.</li>
2252
2251
<li><p>Let <var>property</var> be <var>property</var><aclass="external" data-anolis-spec="dom" href="http://dom.spec.whatwg.org/#converted-to-ascii-lowercase">converted to ASCII lowercase</a>.
<li><p>If <var>priority</var> is neither an <aclass="external" data-anolis-spec="dom" href="http://dom.spec.whatwg.org/#ascii-case-insensitive">ASCII case-insensitive</a> match for the string "<codetitle="">important</code>"
2258
2257
nor the empty string terminate this algorithm.</li>
2259
2258
<li>
2260
-
<p>If <ahref="#parse-a-css-value" title="parse a CSS value">parsing</a><var>value</var> returns null terminate this algorithm.
2261
-
<pclass="note"><var>value</var> can not include "<codetitle="">!important</code>".</p>
2259
+
<p>Let <var>component value list</var> be the result of <ahref="#parse-a-css-value" title="parse a CSS value">parsing</a><var>value</var>.
2260
+
<pclass="note"><var>value</var> can not include "<codetitle="">!important</code>".</p>
2262
2261
</li>
2263
-
<li><p>Finally, set <var>property</var> to <var>value</var> with the <i>important</i> flag set if <var>priority</var> is not the empty
2264
-
string, and unset otherwise.</li>
2262
+
<li><p>If <var>component value list</var> is null terminate these steps.
2263
+
<li><p>If <var>property</var> is a shorthand property, then for each longhand property <var>longhand</var> that <var>property</var> maps to, in canonical
2264
+
order, <ahref="#set-a-css-property" title="set a CSS property">set the CSS property</a><var>longhand</var> to the appropriate value(s) from <var>component value list</var>, with
2265
+
the <var>important</var> flag set if <var>priority</var> is not the empty string, and with the list of declarations being the
<li><p>Otherwise, <ahref="#set-a-css-property" title="set a CSS property">set the CSS property</a><var>property</var> to <var>component value list</var>, with
2268
+
the <var>important</var> flag set if <var>priority</var> is not the empty string, and with the list of declarations being the
<p>To <dfnid="set-a-css-property">set a CSS property</dfn><var>property</var> to a value <var>component value list</var> and optionally with an <var>important</var> flag set, in a
2273
+
list of declarations <var>declarations</var>, follow these steps:
2274
+
2275
+
<ol>
2276
+
<li><p>If <var>property</var> is a <aclass="external" data-anolis-spec="dom" href="http://dom.spec.whatwg.org/#case-sensitive">case-sensitive</a> match for a property of a declaration in
2277
+
<var>declarations</var>, let <var>declaration</var> be that declaration.
2278
+
<li><p>Otherwise, append a new declaration with the property name <var>property</var> to <var>declarations</var> and let <var>declaration</var> be that
2279
+
declaration.
2280
+
<li><p>Set <var>declaration</var>'s value to <var>component value list</var>.
2281
+
<li><p>Set the declaration's <i>important</i> flag if <var>important</var> is set, or unset it otherwise.
2265
2282
</ol>
2266
2283
2267
2284
<p>The <dfnid="dom-cssstyledeclaration-removeproperty" title="dom-CSSStyleDeclaration-removeProperty"><code>removeProperty(<var>property</var>)</code></dfn> method must run these steps:</p>
<var>priority</var>)</code></dfn> method must run these steps:</p>
2170
2180
<ol>
2171
-
<!-- XXX handle shorthands better -->
2172
2181
<li><p>If the <spantitle=concept-css-declaration-block-readonly-flag>readonly flag</span> is set, <spandata-anolis-spec=domtitle=concept-throw>throw</span>
2173
2182
an <codedata-anolis-spec=dom>NoModificationAllowedError</code> exception and terminate these steps.</li>
2174
2183
<li><p>Let <var>property</var> be <var>property</var><spandata-anolis-spec=dom>converted to ASCII lowercase</span>.
<li><p>If <var>priority</var> is neither an <spandata-anolis-spec=dom>ASCII case-insensitive</span> match for the string "<codetitle>important</code>"
2180
2189
nor the empty string terminate this algorithm.</p></li>
2181
2190
<li>
2182
-
<p>If <spantitle='parse a CSS value'>parsing</span><var>value</var> returns null terminate this algorithm.
2183
-
<pclass='note'><var>value</var> can not include "<codetitle>!important</code>".</p>
2191
+
<p>Let <var>component value list</var> be the result of <spantitle='parse a CSS value'>parsing</span><var>value</var>.
2192
+
<pclass='note'><var>value</var> can not include "<codetitle>!important</code>".</p>
2184
2193
</li>
2185
-
<li><p>Finally, set <var>property</var> to <var>value</var> with the <i>important</i> flag set if <var>priority</var> is not the empty
2186
-
string, and unset otherwise.</p></li>
2194
+
<li><p>If <var>component value list</var> is null terminate these steps.
2195
+
<li><p>If <var>property</var> is a shorthand property, then for each longhand property <var>longhand</var> that <var>property</var> maps to, in canonical
2196
+
order, <spantitle="set a CSS property">set the CSS property</span><var>longhand</var> to the appropriate value(s) from <var>component value list</var>, with
2197
+
the <var>important</var> flag set if <var>priority</var> is not the empty string, and with the list of declarations being the
<p>To <dfn>set a CSS property</dfn><var>property</var> to a value <var>component value list</var> and optionally with an <var>important</var> flag set, in a
2205
+
list of declarations <var>declarations</var>, follow these steps:
2206
+
2207
+
<ol>
2208
+
<li><p>If <var>property</var> is a <spandata-anolis-spec=dom>case-sensitive</span> match for a property of a declaration in
2209
+
<var>declarations</var>, let <var>declaration</var> be that declaration.
2210
+
<li><p>Otherwise, append a new declaration with the property name <var>property</var> to <var>declarations</var> and let <var>declaration</var> be that
2211
+
declaration.
2212
+
<li><p>Set <var>declaration</var>'s value to <var>component value list</var>.
2213
+
<li><p>Set the declaration's <i>important</i> flag if <var>important</var> is set, or unset it otherwise.
2187
2214
</ol>
2188
2215
2189
2216
<p>The <dfntitle=dom-CSSStyleDeclaration-removeProperty><code>removeProperty(<var>property</var>)</code></dfn> method must run these steps:</p>
0 commit comments