W3C home > Mailing lists > Public > www-style@w3.org > August 2013

Re: CSSStyleDeclaration: Setting only a value or a priority

From: Simon Pieters <simonp@opera.com>
Date: Mon, 12 Aug 2013 08:57:19 +0200
To: "www-style@w3.org" <www-style@w3.org>, "Peter Sloetjes" <pjs.nl@live.com>
Message-ID: <op.w1oyxtlqidj3kv@simons-macbook-pro.local>
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

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:33 UTC