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

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 UTC