RE: CSSStyleDeclaration: Setting only a value or a priority

On Mon, 19 Aug 2013 18:46:42 +0200, Simon Sapin <simon.sapin@exyr.org> wrote:

> Whitespace has never been significant in CSS. I am very much against  
> changing that.
>
> (Also, whitespace is not necessary when specifying !important :
> data:text/html,<style>body{background:green!important )

Thanks for correcting me, I could easily have tested that. (And significant white-space should perhaps be limited to tabs in Python).

As a better alternative, could a single "!" be required to set a normal priority, such that providing only a property value would not affect priority at all? That is: "style.property = value{!{important}}" ? 
The absence of "!{important}" would then be similar to the absence of a priority argument to "setProperty", with exactly the same effect.
Or would it be better to leave that part of the spec alone?

PJS, Firefox add-on developer.

> To: pjs.nl@live.com; simon.sapin@exyr.org
> CC: www-style@w3.org
> Subject: Re: CSSStyleDeclaration: Setting only a value or a priority
> Date: Mon, 19 Aug 2013 21:10:07 +0200
> From: simonp@opera.com
> 
> On Mon, 19 Aug 2013 18:46:42 +0200, Simon Sapin <simon.sapin@exyr.org>  
> wrote:
> 
> > Le 19/08/2013 15:27, Peter Sloetjes a écrit :
> >> For the "[property] = value" syntax, one could require an extra space
> >> character " " at the end to indicate that the property priority should
> >> be changed to "", while leaving it unchanged when no space is added.
> >> After all, an extra space is required for setting "!important" as well.
> >> Not setting priorities leads to much less side effects and is perhaps
> >> what most users want to do most of the time.
> >
> > Whitespace has never been significant in CSS. I am very much against  
> > changing that.
> >
> > (Also, whitespace is not necessary when specifying !important :
> > data:text/html,<style>body{background:green!important )
> 
> Indeed.
> 
> -- 
> Simon Pieters
> Opera Software
 		 	   		  

Received on Monday, 19 August 2013 19:53:05 UTC