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

Re: [css-variables] Using $foo as the syntax for variables

From: Florian Rivoal <florianr@opera.com>
Date: Tue, 29 May 2012 09:59:09 +0200
To: www-style@w3.org
Message-ID: <op.we18gvs44p7avi@localhost.localdomain>
On Fri, 25 May 2012 18:55:39 +0200, Tab Atkins Jr. <jackalmage@gmail.com>  
wrote:

> If you don't like typing $, it's increasingly difficult to avoid it.
> I suggest modifying your keyboard layout.  I do that when I'm writing
> a lot of Lisp, for example - I swap my () and [] so I can type parens
> without Shift.
>
>> BTW, if you want a more important reason not to change the CSS grammar  
>> to
>> allow the DOLLAR symbol, I have one:       html { $color: red; }      
>>  makes
>> the text color red in IE6 and IE7.
>
> That's an interesting point, but not an important one in my opinion.
> IE6 is finally dying out.  IE7 is still quite present, but on its way
> out.  Obviously, neither of them support variables.  All you have to
> do is not name your variables the same as CSS properties in the
> stylesheets that they receive.

While I am not overly worried about IE6 at this point, this still is
a good example of what happens when you break expectations about the
syntax. Sure IE should have rejected the syntax, but it didn't. And
despite all the complaints about it now, IE6 was still a well
engineered product. A lot of things that deal with CSS got
significantly less QA time, and I would be surprised if tools
didn't break left and right with something like this.

> On Fri, May 25, 2012 at 6:37 AM, Joshua Cranmer <Pidgeot18@verizon.net>  
> The people adding variables to their page are the
> same people choosing to use the templating engine, or at least are
> closely connected to them.  They can work around the issues as they
> come up.

But they may very well not be the ones developing the template system,
so the fix may not be that easy, other than giving up on either
the template engine or css variables.
Received on Tuesday, 29 May 2012 07:59:44 GMT

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