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

On Tue, May 22, 2012 at 6:43 PM, Brian Kardell <bkardell@gmail.com> wrote:
> At the beginning of the thread it seemed that there wasn't a
> definitive example/answer and a few people have commented with some
> variants (like the usage part, but not the declaration part).  Maybe
> having something concrete would help.  Tab -- Are we talking about (I
> don't think so) using exactly this (from Sass site - a):
>
>    $blue: #3bbfce;
>
>    .content-navigation {
>        border-color: $blue;
>    }

Definitely not - that's incompatible with the design of CSS variables,
where they're all tree-scoped.

> Or that would change to something like (b):
>
>    :root {
>         var-blue: #3bbfce;
>    }
>
>    .content-navigation {
>        border-color: $blue;
>    }
>
>
> Or even (c):
>
>
>    :root {
>        $blue: #3bbfce;
>    }
>
>    .content-navigation {
>        border-color: $blue;
>    }

Yes, either of these, though preferably (c).

~TJ

Received on Wednesday, 23 May 2012 16:02:30 UTC