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

Re: [css-variables] Maintain link between var declaration and use

From: Christoph Päper <christoph.paeper@crissov.de>
Date: Mon, 21 May 2012 09:59:51 +0200
Message-Id: <DC85B8AE-A7C4-4D1F-9DAC-FF528877ECA7@crissov.de>
To: www-style list <www-style@w3.org>
Tab Atkins Jr.:
> On Sun, May 20, 2012 at 7:21 AM, Christoph Päper
>> 
>>  var_foo-bar: blue;
>>  color: var(foo-bar);
>> 
>> would be fine, though.
> 
> That gains us nothing, though.  I see no good reason to switch away
> from dashes unless we're going full-on to something that looks like a
> function.

Originally I wanted to propose

  var foo-bar: blue;

and therefore investigated the core grammar where I found out, that property names are very limited and nothing else can come before the colon. Anyway, I’m still a fan of using variable names verbatim, i.e. no prefix, no function notation, no nothing:

  color: foo-bar;

I believe that would work well with the underscore, which is often used in programming languages as a replacement for whitespace characters.

  var_foo-bar: blue;

The issue is rather whether it worked well in the value space, because if variables were just user-defined keywords we needed to come up with a system that establishes the order of preference so authors either could or could not overload existing and future keywords.
Received on Monday, 21 May 2012 08:00:13 GMT

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