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

New CSS variables syntax in latest WebKit

From: David Hyatt <hyatt@apple.com>
Date: Fri, 25 Jul 2008 13:39:15 -0500
To: "www-style@w3.org List" <www-style@w3.org>
Message-id: <F24FEC8A-BE55-452D-9B17-54D5717E146F@apple.com>

I've added support for several of the proposed syntax ideas for CSS  
variables to WebKit.  They are basically all co-existing side by side  
in WebKit right now.  The idea is for people to try out test cases to  
help get a feel for which syntax works best (or you can just proclaim  
which syntax you think is best right now without writing any tests at  
all). ;)

For the rules, the following syntax works:

(1)

@-webkit-variables { ... }
@-webkit-variables screen { ... }

(2)

@-webkit-define { ... }
@-webkit-define for screen { ... }

For variable references, the following syntax works:

(1) -webkit-var(foo)
(2) =foo=
(3) $foo

One concern about using a symbol to represent a variable is that there  
is no way to vendor-prefix it.  Then again, just using a symbol like =  
or $ looks nicer than the ugly "-webkit-var" notation.

dave
(hyatt@apple.com)
Received on Friday, 25 July 2008 18:40:00 GMT

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