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

Re: WebKit now supports CSS Variables

From: Pierre Saslawsky <ps@outspring.com>
Date: Thu, 3 Jul 2008 14:38:32 -0700
Message-Id: <68D401AA-5D37-44B7-A10C-48A3039C32D2@outspring.com>
Cc: David Hyatt <hyatt@apple.com>
To: www-style@w3.org


On Jun 24, 2008, at 1:36 PM, David Hyatt wrote:

> This isn't really covered in the spec, but WebKit preserves variable-
> dependent values as unresolved in the CSS OM.  So progressive
> rendering (were we to do it) would even still work.  I don't see the
> problem.  If the variable is initially undefined, you preserve the
> property/value in the CSS OM with an unresolved value, and if at any
> time you can later resolve it (when new stylesheets load) you do.

It is related to a suggestion I privately submitted in April in  
response to the 1.0 document (http://disruptive-innovations.com/zoo/ 

I think there would be a real use in having a new 'undefined' keyword  
as legit variable value.
- From a legibility standpoint, it would allow to declare in a single  
place all the variables that will be used throughout the web site,  
making it clear that the 'undefined' ones will be assigned later on  
by script or in other stylesheets.
- From a development standpoint, it would allow a script to reset a  
valid variable to the 'undefined' state, therefore reverting the  
corresponding properties to their default value, and possibly back  
later to a valid set value, without having to do the underlying  
cleanup and error handling that might be required by 'removeVariable'.

Received on Friday, 4 July 2008 08:53:25 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:38 UTC