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

Re: [css-variables] Remaining Issues

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Wed, 19 Jun 2013 00:37:11 -0700
Message-ID: <CAAWBYDAQxHmswaDCNpJ2BcoVT-+Byi_Zpqx8NC=8azPPt9mL9A@mail.gmail.com>
To: Simon Sapin <simon.sapin@exyr.org>
Cc: www-style list <www-style@w3.org>
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

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:39:12 UTC