Re: [css-variables] Remaining Issues

On Tue, Jun 18, 2013 at 1:17 PM, Simon Sapin <simon.sapin@exyr.org> wrote:
> 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'.

Note that using "initial" is identical to using "inherit", since the
initial value is invalid-at-computed-value-time, and IACVT properties
take on their initial or inherited value, depending on whether they
inherit by default or not.

> 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.

Yeah, the layering violation objection is reasonable.

~TJ

Received on Wednesday, 19 June 2013 07:37:58 UTC