Re: CSSStyleDeclaration: Setting only a value or a priority

On Wed, 21 Aug 2013 23:46:04 +0200, L. David Baron <dbaron@dbaron.org>  
wrote:

> I think this is a really bad idea (which has apparently now made its
> way into the spec according to comments in
> https://bugzilla.mozilla.org/show_bug.cgi?id=903239 , although I
> don't see any mention in this thread of it).

http://lists.w3.org/Archives/Public/www-style/2013Aug/0297.html

> The underlying mental model of setProperty has, I think, always been
> "append declaration".  The object model of declaration blocks was
> designed without an idea of preserving order; setProperty appends a
> declaration to the end.  Thus setProperty with no priority being a
> no-op if the declaration block already has an !important declaration
> for that property.

setProperty with no priority was *not* a no-op in the previous spec.  
Instead, it would set the value and unset important. This is what Gecko  
(and Presto) implements also.

http://software.hixie.ch/utilities/js/live-dom-viewer/saved/2472

It's no-op in WebKit/Blink/IE, though.

As I said before I made the change, I can see an argument for why no-op  
behavior can be desirable, and asked if we should change the spec to do  
that. Nobody replied to that.

http://lists.w3.org/Archives/Public/www-style/2013Aug/0247.html

> I also think the use case is really obscure, and having to make an
> extra function call to address it (as today) is fine.  I don't see
> strong evidence that we need to change the Web platform to address
> it.
>
> Please revert this spec change.
>
> -David
>


-- 
Simon Pieters
Opera Software

Received on Thursday, 22 August 2013 06:08:01 UTC