Re: CSS Variables

On Feb 7, 2011, at 8:39 PM, Alex Russell wrote:

> On Sun, Feb 6, 2011 at 4:36 AM, Peter Beverloo <peter@lvp-media.com> wrote:
> That was exactly the objection that motivated the current use of "$" in declaration.
>  
>  Therefore
> I'd be in favor of the following:
> 
> @var foo red;
> bar {
>    color: var(foo);
> }
> 
> This was my preference at first, but I eventually changed my mind.
> 
> After some experience with the "var()" syntax via a pre-processor, it eventually wound up littering our code everywhere with syntax that wasn't trivial to un-pack when looking at it. The final ")" can be a long way from the "var(" component, and it's just a whole lot to type and read.

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.

Received on Tuesday, 8 February 2011 18:36:20 UTC