Re: CSS Variables

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.

~TJ

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