W3C home > Mailing lists > Public > www-style@w3.org > June 2013

Re: [css-variables] Remaining Issues

From: Simon Sapin <simon.sapin@exyr.org>
Date: Tue, 18 Jun 2013 21:17:38 +0100
Message-ID: <51C0C062.3000806@exyr.org>
To: www-style@w3.org
Le 18/06/2013 20:16, Lea Verou a écrit :
>> 2. How should the global keyword initial/inherit/default be treated?
>> Are these more of a language-syntax feature, such that they should be
>> obeyed when specified in custom properties, or are they more like
>> normal values, such that they become the variable's value?  It seems
>> like there may be use-cases for either.
> Since these are properties, I think it makes sense to use `inherit`
> to inherit the value of the custom property on the parent rule,
> rather than use it verbatim as a value. I think there are quite a few
> use cases for that. What are the use cases for using `inherit` as a
> variable value? Not sure about initial and default though. They’re
> pretty useless as custom property values and quite useful as variable
> values. However, it would be inconsistent to specify different
> behavior for inherit and different for initial/default:(

Agreed on 'inherit', and I find 'var-foo: initial;' a nicer way to 
"unset" a variable than 'var-foo:;'. I don’t really see use cases either 
way for 'default'.

So I’m in favor of CSS-wide keywords to not be special on Custom 
Properties. Using them as variable values wouldn’t work anyway (unless 
we add a big layering violation) since var() is expanded at computed 
value-time but these keywords act earlier in the cascade.

-- 
Simon Sapin
Received on Tuesday, 18 June 2013 20:17:58 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 18 June 2013 20:17:59 UTC