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: Thu, 22 Aug 2013 08:13:26 +0200
To: "L. David Baron" <dbaron@dbaron.org>
Cc: "www-style@w3.org" <www-style@w3.org>, "Peter Sloetjes" <pjs.nl@live.com>
Message-ID: <op.w17fkoaeidj3kv@simons-macbook-pro.local>
On Wed, 21 Aug 2013 23:46:04 +0200, L. David Baron <dbaron@dbaron.org>  

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


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


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.


> 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

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