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

[css-variables] cycles involving a single variable

From: Cameron McCormack <cam@mcc.id.au>
Date: Mon, 16 Dec 2013 10:34:30 +1100
Message-ID: <52AE3C86.20801@mcc.id.au>
To: www-style list <www-style@w3.org>
I just noticed that the text in the spec that I quoted in my previous mail:

   Custom properties may use variables in their own values to build up
   composite variables. This can create cyclic dependencies where two or
   more custom properties each attempt to use the variable that the
   other defines; doing so makes all the custom properties involved in
   the cycle compute to their initial value (which is a guaranteed-
   invalid value).

doesn't account for cycles that involve a single variable, for example:

   p { var-a: var(a); }

since it talks about two or more custom properties.  I don't think there 
is anything else in the spec that talks about how to resolve the above 
(although it is obvious that it should be invalid).

What is less obvious, but more along the lines of my previous mail, is:

   p { var-a: var(a, 1); }

I think this should also be invalid.
Received on Sunday, 15 December 2013 23:35:09 UTC

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