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

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 UTC