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

RE: [css-variables] Variables used without prefix or function

From: Sylvain Galineau <sylvaing@microsoft.com>
Date: Thu, 24 May 2012 16:50:42 +0000
To: Tab Atkins Jr. <jackalmage@gmail.com>, Christoph Päper <christoph.paeper@crissov.de>
CC: www-style list <www-style@w3.org>
Message-ID: <3C4041FF83E1E04A986B6DC50F0178290A356177@TK5EX14MBXC262.redmond.corp.microsoft.com>

[Tab Atkins Jr.:]
> On Thu, May 24, 2012 at 7:54 AM, Christoph Päper
> <christoph.paeper@crissov.de> wrote:
> > Christoph Päper:
> >>
> >> I’m still a fan of using variable names verbatim, i.e. no prefix, no
> function notation, no nothing:
> [snip proposal]
> I don't see what the benefit to the author is of making variables be
> simple keywords.
> This would make it hard to spot variables in use, as they look just like
> every other keyword.  It would make it confusing to combine with other
> keywords.  It introduces the need for precedence rules which mean that
> *sometimes* an ident is a keyword and other times its a variable.

While many programming languages do not decorate variable names that is imo
largely because the vast majority of their variables are user-defined i.e. 
there is no risk confusion. In fact, when such languages do define some 
variables - e.g. to hold certain pre-defined constants or environment 
parameters - they often use a naming convention meant to distinguish them 
from regular variables (i.e. not just because they might be constants). 

So I strongly agree: CSS is loaded with keyword values that would be 
indistinguishable from user variables and it would be very helpful to be 
able to spot and search for user-defined values from those built in CSS.
> This suggestion has a lot of bad usability problems, and the benefit is
> that you can omit a single character (the $ prefix).  This seems pretty
> easy to reject.

Received on Thursday, 24 May 2012 16:51:28 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:16 UTC