Re:CSS Variables in Firefox 31 – new syntax
by rubiquity on Wednesday July 23, 2014 @09:17AM
(#8074168)
Woah. CSS variables look like compiler flags. There goes the W3C reinventing the wheel when Sass, Less and others have already laid out how to assign variables just fine for years.
[ Parent
| on HN ]
Re:CSS Variables in Firefox 31 – new syntax
by gavinpc on Wednesday July 23, 2014 @10:28AM
(#8074529)
As other posts have stated, CSS variables are not the same thing as preprocessor variables. Specifically, they cascade.
A preprocessor cannot possibly implement CSS variables with cascading because it the value is resolved against a live context.
In other words, you can actually change the variable at runtime with rules that target different selectors.
As such, the "variables" are in fact functions.