Re: [css-variables][css-cascade] interaction of variables with "initial", "inherit", "default" and the "all" shorthand

Tab Atkins Jr. wrote:
> On Mon, May 20, 2013 at 1:49 AM, Cameron McCormack<cam@mcc.id.au>  wrote:
>> Two issues.  First, if you have:
>>
>>    #a { var-x: 1; }
>>    #a>  * { var-x: inherit; }
>>
>> is the computed value of var-x "1" or "inherit"?  From my reading of
>> css-cascade, it would be.  There should at least be a note in css-variables
>> saying whether it works like this.
>
> Heh, you didn't finish your sentence saying what you thought it would be.  ^_^

I meant to say 'it would be "inherit"'. :)

> I'm leaning toward them not being interpreted, in line with values in
> general.  You can already create an invalid value on demand to get the
> 'inherit' behavior, with something like "var-foo: var(foo);".
> However, you can't duplicate the "default" keyword's behavior.

var-foo: var(foo) is pretty obscure.  I think it probably makes more 
sense to treat the global keywords as being interpreted here.  That 
seems to be more useful than being able to substitute "inherit" into 
another property's value.

> On the other hand, the global keywords are almost a language-level
> construct, which just happens to be implemented in the syntax-space of
> property values. !important is similar, but is handled at the Syntax
> level, so you can't use top-level ! in a custom property value.

If you do:

   var-foo: 16px !important !important;
   font-size: var(foo)

is this equivalent to:

   font-size: 16px !important;

?

Received on Tuesday, 21 May 2013 02:00:57 UTC