W3C home > Mailing lists > Public > www-style@w3.org > April 2012

Re: [css-variables] Should var properties respect !important?

From: Brad Kemper <brad.kemper@gmail.com>
Date: Wed, 4 Apr 2012 12:57:43 -0700
Message-Id: <3C47068E-C6C4-48A8-B099-4199B592716C@gmail.com>
Cc: Florian Rivoal <florianr@opera.com>, "www-style@w3.org" <www-style@w3.org>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
On Apr 4, 2012, at 12:04 PM, "Tab Atkins Jr." <jackalmage@gmail.com> wrote:

> On Wed, Apr 4, 2012 at 10:50 AM, Florian Rivoal <florianr@opera.com> wrote:
>> In the example above, the last !important of data-foo is used too make
>> data-foo important, and the first one ends up being its value. When data-foo
>> is expanded into background color, it puts !important at the end, and 2b
>> says that we should ignore it when it is there.
>> 
>> I say that this should make the value of background-color invalid.
> 
> Oh, I see.  Yes, that's another valid option.  Then, modulo the
> effects I described of having the invalidity occur in the var property
> versus the property that uses the variable, this is (2a) - pay
> attention to trailing !important, but !important anywhere else is a
> syntax error.

I prefer this option too, although I don't know what you mean by the "var property".

It would seem weird to me to ignore normal cascade rules, such as the effect of "!important", on a per-property basis. It sound affect a 'data-foo' property the same way it would affect a 'foo' property. But not be copied into the expanded value where it is used. 
Received on Wednesday, 4 April 2012 19:58:19 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:52 GMT