Re: CSSStyleDeclaration: Setting only a value or a priority

On Mon, 19 Aug 2013 21:51:55 +0200, Peter Sloetjes <pjs.nl@live.com> wrote:

> 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.

Including !important in the value does not work today (per spec).

> Or would it be better to leave that part of the spec alone?

Yes. It's fine to require using the method when wanting to set or unset  
important.

-- 
Simon Pieters
Opera Software

Received on Monday, 19 August 2013 20:04:54 UTC