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

Re: CSS Variables

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Tue, 8 Feb 2011 15:40:23 -0800
Message-ID: <AANLkTimbxquGg+0OKgatGD3Jn-7XH1ap46XN3r1=h7+a@mail.gmail.com>
To: Jon Rimmer <jon.rimmer@gmail.com>
Cc: "Linss, Peter" <peter.linss@hp.com>, Alex Russell <slightlyoff@google.com>, Peter Beverloo <peter@lvp-media.com>, Daniel Glazman <daniel.glazman@disruptive-innovations.com>, www-style list <www-style@w3.org>
On Tue, Feb 8, 2011 at 3:35 PM, Jon Rimmer <jon.rimmer@gmail.com> wrote:
> On 8 Feb 2011, at 18:34, "Linss, Peter" <peter.linss@hp.com> wrote:
>> I don't understand that point, how far can a ')' be from the 'var('? There's
>> only supposed to be a single ident in between... (and perhaps whitespace) I
>> suppose you could put comments in between, but ok, don't do that.
> Well, that depends on whether idents can contain other idents,
> var(var(foo)var(bar)) anyone? Or should I stop before Tab's brain seizes up
> again? ;-)

Thank you. ^_^

> But seriously, my experience from programming is that the more parentheses
> on a line, the harder it is to unpick and understand the different
> components of an expression, and a different manner of identification, like
> the $ syntax, makes things easier to parse from a human perspective.

Indeed.  It's easier to read:

linear-gradient($main-color, $secondary-color);

...than it is to read:

linear-gradient(var(main-color), var(secondary-color));

At least, imo.

Received on Tuesday, 8 February 2011 23:41:15 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:07:56 UTC