Re: CSSStyleDeclaration: Setting only a value or a priority

On Sat, 10 Aug 2013 17:32:33 +0200, Peter Sloetjes <pjs.nl@live.com> wrote:

> The current specification of CSSStyleDeclaration.setProperty makes it  
> necessary to call either
> 'getPropertyPriority' or 'getPropertyValue' in case only a property  
> value or a property priority is to be modified.

Can you explain a case where you would want to do this?

> For the purpose of faster and simpler low level style transformations, I  
> would like to see either:
> 1) the CSSStyleDeclaration interface to be extended with the functions  
> 'setPropertyValue' and 'setPropertyPriority', or
> 2)
>  the CSSStyleDeclaration.setProperty function to accept 'null' for the
> property value or property priority as an indication that the
> value/priority should not be changed.

For (2), currently null for the value means that the declaration is to be  
removed and null for priority means that !important gets unset.

> PJS, Firefox add-on developer.                      


-- 
Simon Pieters
Opera Software

Received on Monday, 12 August 2013 06:52:29 UTC