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

RE: Proposal for adding variable declaration blocks

From: Mike Wilson <mikewse@hotmail.com>
Date: Fri, 11 Jul 2008 23:24:35 +0200
Message-ID: <BAY116-DAV119F5E72DB572833F7BB45A4900@phx.gbl>
To: "'www-style list'" <www-style@w3.org>, "'David Hyatt'" <hyatt@apple.com>
Message-ID: <026c01c8e39c$8455d4c0$0a01a8c0@mikedeskxp>

It's great that you are working with this!

The "define" suggestion looks nice. A slight variation that I 
also think is nice, is blending in some of the ideas from your 
original proposal which would result in:

  @define {
    myForegroundColor: blue;
    myBackgroundColor: green;
    myButtonStyle: {
      border: outset silver;
      background: silver;

(It probably has to be adjusted somewhat to play well with the
CSS parser, but you get the general idea.)

I agree with Brad and others that the media stuff could instead
be done with normal media blocks.

Lastly, I'd put my vote on fantasai's "$ dereferencing" or 
something similar and well known.

Best regards
Mike Wilson

David Hyatt wrote:
	On Jul 2, 2008, at 12:20 AM, Brad Kemper wrote:
		On Jul 1, 2008, at 4:07 PM, fantasai wrote:

			Another idea:
http://lists.w3.org/Archives/Public/www-style/2008Apr/0183.html */
			 @define for screen {
			   foregroundColor: blue;
			   backgroundColor: green;
			 @define boxStyle {
			   border: 3pt solid;
			   padding: 6pt;
			 @define buttonStyle for screen {
			   border: outset silver;
			   background: silver;

		I like this, except for "for screen". Putting it all in 
		an @media screen block should be enough, if you want to 
		limit it to one media type.

		What I like: It is very simple and easy to remember and 
		use. @define is used for different types of variables 
		(singletons or groups), and it is the structure that 
		determines how it is used. I like this much more than 
		the proposals with multiple names for the various flavors 
		(@values, @property-set).

	I like this syntax also.  I think it's very elegant.
Received on Friday, 11 July 2008 21:25:31 UTC

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