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
The <dfn method for=CSSStyleDeclaration>setPropertyValue(<var>property</var>, <var>value</var>)</dfn> method must run these
2219
-
steps:
2220
-
<ol>
2221
-
<li>If the <a for="CSSStyleDeclaration">readonly flag</a> is set,
2222
-
then <a>throw</a> a {{NoModificationAllowedError}} exception.
2223
-
<li>If <var>property</var> is not a <a>custom property</a>, follow these substeps:
2224
-
<ol>
2225
-
<li>Let <var>property</var> be <var>property</var><a lt="ASCII lowercase">converted to ASCII lowercase</a>.
2226
-
<li>If <var>property</var> is not a <a>case-sensitive</a> match for a <a>supported CSS property</a>, then return.
2227
-
</ol>
2228
-
<li>If <var>value</var> is the empty string, invoke {{CSSStyleDeclaration/removeProperty()}}
2229
-
with <var>property</var> as argument and return.
2230
-
<li>
2231
-
Let <var>component value list</var> be the result of <a lt="parse a CSS value">parsing</a><var>value</var> for property <var>property</var>.
2232
-
2233
-
Note: <var>value</var> can not include "<code>!important</code>".
2234
-
2235
-
<li>If <var>component value list</var> is null, then return.
2236
-
<li>If <var>property</var> is a shorthand property, then for each longhand property <var>longhand</var> that <var>property</var> maps to, in canonical
2237
-
order, <a lt="set a CSS declaration value">set the CSS declaration value</a><var>longhand</var> to the appropriate value(s) from <var>component
2238
-
value list</var>, and with the list of declarations being the <a for="CSSStyleDeclaration">declarations</a>.
2239
-
<li>Otherwise, <a lt="set a CSS declaration value">set the CSS declaration value</a><var>property</var> to the value <var>component value
2240
-
list</var>, and with the list of declarations being the <a for="CSSStyleDeclaration">declarations</a>.
2241
-
<li><a>Update style attribute for</a> the <a>CSS declaration block</a>.
2242
-
</ol>
2243
-
2244
-
To <dfn>set a CSS declaration value</dfn> to a value <var>component value list</var> in a list of declarations <var>declarations</var>, follow these steps:
2245
-
2246
-
<ol>
2247
-
<li>If <var>property</var> is a <a>case-sensitive</a> match for a <a for="CSS declaration">property
2248
-
name</a> of a <a>CSS declaration</a> in <var>declarations</var>, let <var>declaration</var> be that <a>CSS declaration</a>.
2249
-
<li>Otherwise, append a new <a>CSS declaration</a> with the <a for="CSS declaration">property name</a><var>property</var>
2250
-
to <var>declarations</var> and let <var>declaration</var> be that <a>CSS declaration</a>.
2251
-
<li>Set <var>declaration</var>'s <a for="CSS declaration">value</a> to <var>component value list</var>.
2252
-
</ol>
2253
-
2254
-
The <dfn method for=CSSStyleDeclaration>setPropertyPriority(<var>property</var>, <var>priority</var>)</dfn> method must run
2255
-
these steps:
2256
-
2257
-
<ol>
2258
-
<li>If the <a for="CSSStyleDeclaration">readonly flag</a> is set,
2259
-
then <a>throw</a> a {{NoModificationAllowedError}} exception.
2260
-
<li>If <var>property</var> is not a <a>custom property</a>, follow these substeps:
2261
-
<ol>
2262
-
<li>Let <var>property</var> be <var>property</var><a lt="ASCII lowercase">converted to ASCII lowercase</a>.
2263
-
<li>If <var>property</var> is not a <a>case-sensitive</a> match for a <a>supported CSS property</a>, then return.
2264
-
</ol>
2265
-
<li>If <var>priority</var> is not the empty string and is not an <a>ASCII case-insensitive</a> match for the string
2266
-
"<code>important</code>", then return.
2267
-
<li>If <var>property</var> is a shorthand property, then for each longhand property <var>longhand</var> that <var>property</var> maps to, in canonical
2268
-
order, <a lt="set a CSS declaration priority">set the CSS declaration priority</a><var>longhand</var> with the <i>important</i> flag set if
2269
-
<var>priority</var> is not the empty string, and unset otherwise, and with the list of declarations being the
2270
-
<a for="CSSStyleDeclaration">declarations</a>.
2271
-
<li>Otherwise, <a lt="set a CSS declaration priority">set the CSS declaration priority</a><var>property</var> with the <i>important</i> flag set
2272
-
if <var>priority</var> is not the empty string, and unset otherwise, and with the list of declarations being the
2273
-
<a for="CSSStyleDeclaration">declarations</a>.
2274
-
<li><a>Update style attribute for</a> the <a>CSS declaration block</a>.
2275
-
</ol>
2276
-
2277
-
To <dfn>set a CSS declaration priority</dfn><var>property</var> optionally with an <i>important</i> flag set, in a list of declarations
2278
-
<var>declarations</var>, follow these steps:
2279
-
2280
-
<ol>
2281
-
<li>If <var>property</var> is a <a>case-sensitive</a> match for a <a for="CSS declaration">property
2282
-
name</a> of a <a>CSS declaration</a> in <var>declarations</var>, let <var>declaration</var> be that <a>CSS declaration</a>.
2283
-
<li>Otherwise, return.
2284
-
<li>If the <i>important</i> flag is set, set <var>declaration</var>'s <a for="CSS declaration">important flag</a>. Otherwise,
The <dfn method for=CSSStyleDeclaration>removeProperty(<var>property</var>)</dfn> method must run these steps:
2289
2217
<ol>
2290
2218
<li>If the <a for="CSSStyleDeclaration">readonly flag</a> is set,
@@ -2986,6 +2914,7 @@ Changes From 5 December 2013 {#changes-from-5-december-2013}
2986
2914
* Serialization of :lang() is changed.
2987
2915
* Serialization of <<color>> and <<number>> is changed.
2988
2916
* {{CSSStyleDeclaration/setProperty()}} on {{CSSStyleDeclaration}} is changed.
2917
+
* <code>setPropertyValue</code> and <code>setPropertyPriority</code> are removed from {{CSSStyleDeclaration}} due to lack of interest from implementations.
2989
2918
2990
2919
2991
2920
Changes From 12 July 2011 To 5 December 2013 {#changes-from-12-july-2011-to-5-december-2013}
@@ -3006,8 +2935,7 @@ Changes From 12 July 2011 To 5 December 2013 {#changes-from-12-july-2011-to-5-de
3006
2935
<li>Shorthands are now supported in {{CSSStyleDeclaration/setProperty()}},
3007
2936
{{CSSStyleDeclaration/getPropertyValue()}}, et al.
3008
2937
3009
-
<li>{{CSSStyleDeclaration/setPropertyValue()}} and
3010
-
{{CSSStyleDeclaration/setPropertyPriority()}} are introduced.
2938
+
<li><code>setPropertyValue</code> and <code>setPropertyPriority</code> are added to {{CSSStyleDeclaration}}.
3011
2939
3012
2940
<li>The <code>style</code> and <code>media</code> attributes of various interfaces are annotated with the <code>[PutForwards]</code> WebIDL
0 commit comments