Re: [css-variables] Using $foo as the syntax for variables

> From: Eric Meyer
>
> This could potentially be extended further with multiple
> fallbacks (eg font-stacks), or with nesting functions:
>
> margin: stack($foo, parent($bar), calc($baz + 3em), 20px);

+1

It's a nice way to support multiple values for different versions of CSS.

    :root {
        var-bg1:
            black
            fallback(
                -x-superb-gradient(woot),
                superb-gradient(woot),
                url(superb-woot.svg),
            )
        ;
    }

    .some {
        background: var-bg1;
    }

Note: It need some rule to handle the case a declaration contains more than 
one fallback chain. 

Received on Wednesday, 23 May 2012 19:34:14 UTC