W3C home > Mailing lists > Public > www-style@w3.org > May 2012

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

From: François REMY <fremycompany_pub@yahoo.fr>
Date: Wed, 23 May 2012 21:33:50 +0200
Message-ID: <F2C36BE8398148B8B1E32151221D1534@FREMYD2>
To: "Eric Meyer" <eric@oddbird.net>, <www-style@w3.org>
> 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 GMT

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