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

Re: [css-variables] using variables in shorthands

From: Florian Rivoal <florianr@opera.com>
Date: Mon, 12 Mar 2012 09:58:09 +0100
To: www-style@w3.org
Message-ID: <op.wa1u67le4p7avi@localhost.localdomain>
On Sun, 11 Mar 2012 10:05:15 +0100, Shane Stephens <shans@google.com>  
wrote:

> Hi Florian,
>
> I don't think variables should be able to encode multiple values (like
> 1em 2em or 1em 2em 3em 4em), because these are a nightmare to type (as
> in type check, not type out).

But do you need to type them at all until the variables are used?  
Intuitively,
I'd just let the lexer turn the content of the variable into a list of  
tokens,
and keep it that way until you're actually expanding the variable into a  
property
other than another data-* property. Only then can you unambiguously  
determine what
these tokens mean (if anything).

> The other two cases are somewhat serious :)

Right. Regardless of the whether you can store single values or not, my  
original
point stands.

  - Florian
Received on Monday, 12 March 2012 08:58:42 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 22 May 2012 03:48:51 GMT