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

Re: [css-variables] Different syntax for variable definition and use

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Wed, 29 Aug 2012 10:20:22 -0700
Message-ID: <CAAWBYDDNrVdPpnRj2qddN3hVcaPhYLdS2g3_Gy5f3AEe69YVdQ@mail.gmail.com>
To: "Jens O. Meiert" <jens@meiert.com>
Cc: www-style@w3.org
On Wed, Aug 29, 2012 at 10:18 AM, Jens O. Meiert <jens@meiert.com> wrote:
>> > Why does the variable name need to be part of the declaration?
>>
>> I don't understand what you mean by this.
>
> “var-foo” appears to mean the variable is called “var-foo”; but with
> “var(foo)”, the variable seems to be called “foo".
>
> That is exactly why I claim it is not easy to connect things, and why
> this particular syntax is unintuitive and hard to use.

I think it's pretty clear: "var-foo" means you're declaring a property
for a var named foo.  Change the - to a space, the : to an =, and
you're practically writing JS! ^_^

>> > And what are, pardon me Tab, the other “‘variable-like’ things” we
>> > would need the “$” syntax for
>>
>> I'm thinking of $ for macro-style expansion, or something along those lines.
>
> What is macro-style expansion, why do we need it, and how does it beat
> variables in terms of syntax? (A thread pointer would be enough,
> cheers :)

Macro-style expansion is just SASS variables.

~TJ
Received on Wednesday, 29 August 2012 17:21:28 GMT

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