This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
http://dev.w3.org/csswg/cssom/#the-cssstyledeclaration-interface The text says >value can not include "!important". What does this mean in practice? Throw an exception? Terminate the steps silently?
The note is non-normative so it doesn't mean anything on its own. The normative part for what happens if you were to include !important is [[ 6. Let component value list be the result of parsing value for property property." ]] -> [[ To parse a CSS value value for a given property means to follow these steps: 1. Let list be the value returned by invoking parse a list of component values from value. 2. Match list against the grammar for the property property in the CSS specification. 3. If the above step failed, return null. 4. Return list. ]] Since !important is not part of the grammar for any property, this returns null. Back to setProperty: [[ 7. If component value list is null terminate these steps. ]] Would it be clearer if the note was removed?
Yes, or at least reworded. The way it reads right now suggests that implementors should be directly addressing the condition somehow.