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

[css-variables] CSS Variables are a NEW kind of variable

From: François REMY <fremycompany_pub@yahoo.fr>
Date: Sun, 27 May 2012 10:26:46 +0200
Message-ID: <D6C7527748204EC0A23EDC14F5C94D4E@FREMYD2>
To: "Sebastian Zartner" <sebastianzartner@gmx.de>, "Shane Stephens" <shans@google.com>
Cc: <jackalmage@gmail.com>, <www-style@w3.org>, <florianr@opera.com>, "Sylvain Galineau" <sylvaing@microsoft.com>
The thruth has to be told about "using the $foo syntax for css variables": 
the whole thread clearly show that people are completely failling to see the 
whole point of cascading variables. And if we continue toward that 
direction, people will likely never understand it anytime soon (I speak 
about the usual web developper, not the few ones that read and understand 
the essence of specifications).

To summarize, we have :
- people asking to be able to use $foo anywhere (even in selectors, property 
names)
- people asking to not have to use :root for setting variables and asking 
for @variables instead

People are excited to reuse, for css variables, a syntax used in many 
programming and templating languages to do preprocessor work (echo "xxx $foo 
xxx" in PHP, dir $folder in Bash, ...) because this is what they expect from 
CSS variables. They expect them to do preprocessor work. Have you seen a 
voice outside this working group asking publicly for cascading variables? 
No, because most people haven't heard of that, and aren't likely to 
understand its implications. We're developing CSS variables in expectation 
of HTML Components, Shadow DOM and many things people are not yet 
understanding, because they simply don't exist at this time.

The decision to make the css variables like css properties is what brought 
css variables to life in this working group, what brought so much excitment. 
This idea is really disruptive, this is a bold move and one I truly love. 
However, since we've introduced the idea of the $foo syntax and asked the 
community to show support for it, more and more people are asking to remove 
all that css variables uniqueness (an incredibly useful feature) and just go 
the SASS/Bash way.

The problem is outlined by Stephen Wolfram in a review-of-reviews of his 
latest book :

[...] if people think something is a small idea, they’ll try to understand 
it by straightforwardly extending what they already know. And when that 
doesn’t work, they’ll just be confused. On the other hand, if you 
communicate up front that something is big and important, then people will 
make the effort to understand it on its own terms—and will much more readily 
be able to place and absorb it [...] --  
http://blog.stephenwolfram.com/2012/05/living-a-paradigm-shift-looking-back-on-reactions-to-a-new-kind-of-science/

I'm seriously asking the question: are there any kind of variables existing 
out there who work like the CSS variables? If there's no, maybe it's worth 
stopping to think about what currently exist and try to use a syntax that 
best define the new kind of variable we're trying to define, not a syntax 
that best fit to the currently existing kind of variables. 
Received on Sunday, 27 May 2012 08:27:12 GMT

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