Re:CSS Variables published as First Public Working Draft
by underwater on Thursday April 12, 2012 @01:43AM
(#3831182)
The spec allows the same variable to be defined multiple times, and have cascading determine which value is used.
As far as I can see this completely removes the ability to implement variables in a preprocessor (i.e. serve a style sheet with variables substituted with their values to Internet Explorer). So developers can't use the feature until it's made available on all browsers.
Consider the following code. It can't be translated back into standard CSS without knowing the DOM structure of the document it will be applied to.
#nav { var-color: red; }
#side { var-color: blue; }
body p { color: var(color); }
As far as I can see this completely removes the ability to implement variables in a preprocessor (i.e. serve a style sheet with variables substituted with their values to Internet Explorer). So developers can't use the feature until it's made available on all browsers.
Consider the following code. It can't be translated back into standard CSS without knowing the DOM structure of the document it will be applied to.