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

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

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Wed, 23 May 2012 17:21:46 -0700
Message-ID: <CAAWBYDBcHFw+anm0kmg1x1ZArGV1YrmoHdsH7SuhvJs7GuyH-g@mail.gmail.com>
To: liam@w3.org
Cc: Eric Meyer <eric@oddbird.net>, www-style@w3.org
On Wed, May 23, 2012 at 5:18 PM, Liam R E Quin <liam@w3.org> wrote:
> On Wed, 2012-05-23 at 12:54 -0700, Tab Atkins Jr. wrote:
>> [...]
>> Variables can hold any value,
>> including values that contain commas.
> Presumably they can also hold $ signs too.

Kinda.  When I change the spec to explicitly define the value-space,
unrestricted DELIM tokens won't be allowed.  However, var references
can be - they're expanded at computed-value time (the only thing
that's ever "resolved" in a variable before it's used in a property).

> Is the ${name} syntax also allowed? e.g.
>   content: "hello ${var1}000 and ${var2}nospaceafter";

No, they can only be used as component values right now, so they can't
be used within strings.  That's an interesting use-case, though.

Received on Thursday, 24 May 2012 00:22:36 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:16 UTC