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

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

From: Sylvain Galineau <sylvaing@microsoft.com>
Date: Thu, 31 May 2012 02:04:21 +0000
To: Divya Manian <manian@adobe.com>, François REMY <fremycompany_pub@yahoo.fr>, "www-style@w3.org" <www-style@w3.org>
Message-ID: <3C4041FF83E1E04A986B6DC50F0178290A358F55@TK5EX14MBXC262.redmond.corp.microsoft.com>

[Divya Manian:]
> On 5/30/12 12:59 AM, "François REMY" <fremycompany_pub@yahoo.fr> wrote:
> >
> >For instance, if I was responsible of the spec, I think I would have
> >renamed "variables" into "user-defined properties".
> >
> >I completely agree. I also would prefer something like "just use an
> >identifier".
> >
> >    :root { x-link-color: blue }
> >    a { color: x-link-color }
> >
> >If this is not possible to do, we shall need an introductory token,
> >which $ can be. However, even with "x-", the var() function should be
> >kept to provide a default (as second argument) for when the variable is
> >invalid.
> This is infinitely better than what has been proposed so far. I think
> defining them as user-defined property also makes a lot of sense. X-prefix
> would work for me too! I am not beholden to the $ sign.
Not to prove that everyone's preference is someone else's ugly but I can't
stand the x-convention. If we're going to have a prefix why not make it something
readable. For instance:

	:root { define-link-color: blue }
	a { color: $link-color }

...is imo a reasonable balance: terse at the point of use and very explicit at 
the point of declaration since there should be many of the former for each of 
the latter.
Received on Thursday, 31 May 2012 02:05:15 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:38:59 UTC