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

Re: [Css Variables] Variable Declaration Blocks

From: David Hyatt <hyatt@apple.com>
Date: Thu, 25 Sep 2008 04:02:27 -0500
To: Anne van Kesteren <annevk@opera.com>
Cc: Mike Wilson <mikewse@hotmail.com>, "www-style@w3.org List" <www-style@w3.org>
Message-id: <557C48D0-8B48-4224-A89F-6A4FB6116EBB@apple.com>

On Sep 25, 2008, at 3:33 AM, David Hyatt wrote:

> On Sep 25, 2008, at 3:21 AM, David Hyatt wrote:
>
>>
>> On Sep 25, 2008, at 3:10 AM, Anne van Kesteren wrote:
>>
>>>
>>> On Thu, 25 Sep 2008 08:12:22 +0200, Mike Wilson  
>>> <mikewse@hotmail.com> wrote:
>>>> fantasai wrote:
>>>>> This was as far as I got Friday afternoon at the F2F:
>>>>> http://fantasai.inkedblade.net/style/specs/constants/
>>>>>
>>>>> It's not very complete, but I think it captures the important  
>>>>> points
>>>>> in the discussion.
>>>>
>>>> The discussion in the meeting notes
>>>> http://lists.w3.org/Archives/Public/www-style/2008Sep/0075.html
>>>> was kind of brief regarding some of the technical problems with the
>>>> original CSS Vars suggestion.
>>>
>>> Well, the CSSOM problem is significant.
>>
>
> http://fantasai.inkedblade.net/style/specs/constants/
>
> Notice how the above proposal has to worry about having @import  
> constants" to deal with loading problems created by parse time  
> resolution.  That hardly seems simpler to me.  Variables as Daniel  
> and I specified them can remain unresolved until you end up using  
> those rules in a specific medium.  This "global soup" approach is  
> simple and intuitive for authors, since the variable names always  
> cross stylesheet boundaries (without ever having to delay the  
> parsing of a sheet because another sheet hasn't loaded yet), and the  
> last rule specified in the sheet order wins.

One final point I wanted to make.  WebKit does not cull duplicate  
properties from the CSS OM and basically ignores the one value per  
property per declaration rule.  This has not caused compatibility  
problems that I'm aware of at least.  It means that in examples like  
this:

@-webkit-variables { a: foo; } div { color: green; } div { color: red;  
color: -webkit-var(a); }

where "a" fails to resolve to any usable value that the div will end  
up red and not green.  If the declaration held only one value per  
property, then you'd end up with a green color (and I don't think  
that's what an author would expect).
Received on Thursday, 25 September 2008 09:03:09 GMT

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