Re: [css-variables] Putting it all toegether (syntax)

Seems like pretty nice syntax to me. Just do the next step and allow
@variables { ... } on the top level being the same as :root { @variables {
... } }

Peter

On 6/4/12 5:01 PM, "Marat Tanalin | tanalin.com" <mtanalin@yandex.ru>
wrote:
>[snip]
>> That @variables rule is exactly identical to a normal style rule in
>> mechanics.  You avoid the need to put a prefix on your var names, but
>> in return are forced to put a prefix on your selector (the @variables
>> token and the parens), and probably have to repeat selectors that
>> you're already using to apply normal styling properties.
>
>We are forced to repeat selectors multiple, multiple times again and
>again everyday for more than 10 years, so apparently it's not considered
>a serious issue by CSS WG. And repeating selector in @variables rule is
>not something that could make situation any worse.
>
>For the rest, it may (or may not) make sense to consider using @variables
>at-rule inside regular rules:
>
>    .example {
>        @variables {
>            link-color: red;
>        }
>    }
>
>    .example A {color: $link-color; }
>
>[snip]

Received on Tuesday, 5 June 2012 01:02:19 UTC