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

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.

~TJ

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