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

Re: New CSS variables syntax in latest WebKit

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Fri, 25 Jul 2008 14:01:11 -0500
Message-ID: <dd0fbad0807251201j1753f26ai73522af0488468a9@mail.gmail.com>
To: "David Hyatt" <hyatt@apple.com>
Cc: "www-style@w3.org List" <www-style@w3.org>
On Fri, Jul 25, 2008 at 1:39 PM, David Hyatt <hyatt@apple.com> wrote:

>
> 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)


 @-webkit-variables and @-webkit-define are identical in effect, just
different names, right?  I haven't tested yet, but do these work intuitively
within @media blocks in the current implementation?  If not, are they
expected to?

Currently it appears that the variables syntax is only for single values, to
be used in the normal manner where the variable dereferences into a
keyword.  Is this correct?  If so, is it expected that there will be a
syntax for assigning entire sets of values?

I'm not intending to stir up more of the discussions on these issues, merely
to get the details clarified.  ^_^

~TJ
Received on Friday, 25 July 2008 19:01:50 GMT

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