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

On Tue, Apr 3, 2012 at 11:18 PM, Florian Rivoal <florianr@opera.com> wrote:
> On Tue, 03 Apr 2012 03:31:47 +0200, Tab Atkins Jr. <jackalmage@gmail.com>
> wrote:
>
>> 2) Treat !important like normal, and have it effect the cascade (and
>> not be part of the variable's value)
>
>
> I think I like a non listed variant of 2: treat !important at the end of a
> data- property normally. Any other !important in the data- property causes
> properties into which it is expanded to be invalid.
>
> This is close to 2b, but different in this case for example:
>
> ul {
>  data-foo: !important !important;
>  data-bar: red;
> }
> li{
>  background-color: data(bar) data(foo);
> }

It seems that it's only different from 2b if you're using the var
property solely to pass data to JS, not to use in CSS.  Or am I
missing something?

~TJ

Received on Wednesday, 4 April 2012 17:37:28 UTC