[cssom] overwriting an important style

Apologies if I've overlooked something, but it appears from the spec that there is no single method that can be invoked on an elements style declaration to change it from (e.g.) "color: red !important" to "color: black". 

Step 3 of http://dev.w3.org/csswg/cssom/#append-a-css-declaration says: "If declaration has its important flag set and the important flag is not set, terminate these steps."


It seems that in order to change from "color: red !important;" to "color: black;", one should be able to say "elem.style.color = 'black';" or at the very least "elem.style.setProperty('color', 'black', '');"


However, the way the spec is written (and the way all but FF implement), the following is required: "elem.style.setPropertyPriority(''); elem.style.setPropertyValue('black');"


What's the reason for this termination step and not allowing for elem.style.setProperty('color', 'black', ''); to work once the important flag has been set on a declaration?


Can this be changed?
—
Sent from Mailbox

Received on Monday, 8 September 2014 03:19:40 UTC