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

[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