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

Re: New CSS variables syntax in latest WebKit

From: Brad Kemper <brkemper@comcast.net>
Date: Fri, 25 Jul 2008 22:24:59 -0700
Cc: "Tab Atkins Jr." <jackalmage@gmail.com>, "www-style@w3.org List" <www-style@w3.org>
Message-Id: <4E7D17E3-832D-43F3-8F50-9F7E7F750EC3@comcast.net>
To: David Hyatt <hyatt@apple.com>

On Jul 25, 2008, at 12:32 PM, David Hyatt wrote:

> No, they don't work in @media blocks.  At the moment variables must  
> be defined at the top of a stylesheet (just after the @imports). As  
> with the @import rule, variables rules support media queries built  
> in, e.g.,
> @define for print { ... }
> @variables print { ... }
> instead of
> @media print { @define { ... } }
> If we want variables to work inside @media blocks, we'd basically  
> have to relax the restriction that variables rules must be at the  
> start of the stylesheet.  (There is no implementation hurdle to  
> doing so... this basically just comes down to syntactic preference.)

David, thank you for giving this to us to play with. As for the  
restriction you mention, I don't see any real downside to relaxing  
that. Maybe others do, and can comment on that. If it only meant that  
variables could not be used until after they are defined in the serial  
reading of the CSS, I could live with that (which would make them into  
de facto constants, I think).
Received on Saturday, 26 July 2008 05:25:36 UTC

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