W3C home > Mailing lists > Public > www-style@w3.org > February 2011

Re: CSS Variables

From: Jon Rimmer <jon.rimmer@gmail.com>
Date: Sun, 6 Feb 2011 12:16:00 +0000
Message-ID: <AANLkTikq78AyhU0GTzH7VE+HOT-J7xRxOcczmrm+nSmh@mail.gmail.com>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
Cc: www-style list <www-style@w3.org>
As a developer I'm very much in support of CSS variables, but I have a
couple of questions:

Would variables support values including other variables? E.g.

@var $foo red
@var $bar $foo

Would variables be possible within the notation for types? E.g.

@var $hue 255

body {
   background-color: hsla($hue, 50%, 50%, 1)
}

This is possible within a pre-processor and is, in my opinion, an
important use case. When developing HTML apps, I have frequently
wanted to have various visual elements whose colours and gradients
share a single 'theme' hue, while have different opacities and what
not, then be able to change the 'theme' hue and have all the elements
update accordingly.

What will be the effect of using a variable that is not initialised?
Will this be equivalent to setting an 'auto' value?
Received on Sunday, 6 February 2011 12:16:33 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:37 GMT