Re: [Css Variables] Variable Declaration Blocks

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 UTC