W3C home > Mailing lists > Public > www-style@w3.org > June 2008

Re: WebKit now supports CSS Variables

From: David Hyatt <hyatt@apple.com>
Date: Tue, 24 Jun 2008 16:19:56 -0500
To: Håkon Wium Lie <howcome@opera.com>
Cc: Maciej Stachowiak <mjs@apple.com>, www-style list <www-style@w3.org>
Message-id: <03DE0B1D-FFEA-4956-AA95-7F8ADC14F149@apple.com>

On Jun 24, 2008, at 4:12 PM, Håkon Wium Lie wrote:

>
> Also sprach Maciej Stachowiak:
>
>>>>> style sheet 1: @variable { X: 10px }
>>>>> style sheet 2: @variable { X: none }
>>>>> style sheet 3: div { width: var(X) }
>
>> Your above situation is analogous to the following:
>>
>> style sheet 1: div.someclass { width: 30px; }
>> style sheet 2: div#someid { width: 10px; }
>> style sheet 3: div { width: 20px; }
>
> It's different because because the validity of the declarations is
> known at parse-time. Invalid declarations should be dropped, and not
> be visible in the DOM.


Yes, the resolved expression *in a specific medium* may be  
inapplicable, but the medium-independent back-end CSS OM always  
contains an opaque unresolved variable expression (whose cssText will  
just dump the expression with the unresolved variables in it).  It  
isn't invalid.  It is the act of resolution that determines whether  
the expression becomes invalid, and that can only take place when you  
are doing resolution in a specific medium.

dave
(hyatt@apple.com)
Received on Tuesday, 24 June 2008 21:20:37 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:55:07 GMT