W3C home > Mailing lists > Public > www-style@w3.org > February 2011

Re: CSS Variables

From: Jon Rimmer <jon.rimmer@gmail.com>
Date: Mon, 7 Feb 2011 20:52:40 +0000
Message-ID: <AANLkTim+5s5vZm0pEP4CQyqX+89nN_L=R-O783LJJgdW@mail.gmail.com>
To: Sylvain Galineau <sylvaing@microsoft.com>
Cc: "Tab Atkins Jr." <jackalmage@gmail.com>, "www-style@w3.org" <www-style@w3.org>
On 7 February 2011 20:19, Sylvain Galineau <sylvaing@microsoft.com> wrote:
>
> Care to elaborate on the volume and source of this feedback from implementors
> and authors ? It's hard to understand what 'overwhelming' means without any
> context. (Bonus points if they would send this feedback to the mailing list).
>

Speaking as an author, I'd prefer the $ syntax. If we take the
following two lines for example...

background-image: linear-gradient(90deg, hsl(var(midtone), 50%, 75%),
hsl(var(midtone), 50%, 25%));

background-image: linear-gradient(90deg, hsl($midtone, 50%, 75%),
hsl($midtone, 50%, 25%));

Personally I find it easier to scan and pick-out the variables in the
second line.

I also find that it's easier to type, requires less tracking of
balancing parentheses, and seems to more intuitively indicate a
variable than var(), which I would think was a function of some sort.

Jon
Received on Monday, 7 February 2011 20:53:12 GMT

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