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

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

From: François REMY <francois.remy.dev@outlook.com>
Date: Mon, 20 May 2013 10:57:34 +0200
Message-ID: <DUB120-W31864433A59E35055AF1C3A5AF0@phx.gbl>
To: Cameron McCormack <cam@mcc.id.au>, www-style list <www-style@w3.org>
> Two issues. First, if you have:
>
> #a { var-x: 1; }
> #a> * { var-x: inherit; }
>
> is the computed value of var-x "1" or "inherit"?

My interpretation is that 'var-x' has the 'inherit' value. If you want to 'inherit' the parent value, you've to use something like "var(parent x)" (aka "get(parent var-x)") which is resolved at pre-computation time.


>
> Second, if you have:
>
> #b { var-x: 1; all: initial; }
>
> does 'all' also include custom properties? If it does, does this
> declaration set var-x to its initial (empty) value, or does it set it to
> the keyword "initial"?

This is a tricky one :-) I've no idea what this is doing but I guess it should reset all variables to their empty value. 		 	   		  
Received on Monday, 20 May 2013 08:58:02 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:30 UTC