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

Re: [css3-variables] review comments on latest draft

From: Lea Verou <leaverou@gmail.com>
Date: Tue, 22 May 2012 15:30:26 -0700
Message-ID: <4FBC1382.1060600@gmail.com>
To: John Daggett <jdaggett@mozilla.com>
CC: www-style list <www-style@w3.org>
On 21/5/12 22:56, John Daggett wrote:
>> Variable properties are ordinary properties, and can be read or
>> modified using all of the existing CSSOM APIs for reading or
>> modifying properties.
> So getPropertyValue returns what value for "var-foo" if 'var-foo' is
> never declared?  It *always* returns 'invalid' for var-* if the
> variable hasn't been defined?
>
Since variables are designed to resemble normal properties as closely as 
possible, I’d expect it to return `initial`. As a bonus, treating 
undeclared variables as equivalent to the `initial` keyword would also 
simplify their use, as it's easier to explain that instead of the 
"invalid variable" concept.

-- 
Lea Verou (http://lea.verou.me | @LeaVerou)
Received on Tuesday, 22 May 2012 22:31:17 GMT

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