W3C home > Mailing lists > Public > www-style@w3.org > August 2012

Re: Thinking about mixins as a new type of selector

From: Alex Russell <slightlyoff@google.com>
Date: Mon, 13 Aug 2012 14:55:21 +0100
Message-ID: <CANr5HFURsLZJOWVGTm++iq6n3QtR2s2sDqp=W9dKncF4avJKoA@mail.gmail.com>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
Cc: "L. David Baron" <dbaron@dbaron.org>, www-style@w3.org
I know this idea isn't new and that many versions have been found wanting,
but we did do work to flesh out what an acceptable syntax might look like a
year+ ago. The most visible aspects of that work are part of the ExCSS repo:

   http://code.google.com/p/experimental-css/

You can get a sense for it here:


http://code.google.com/p/experimental-css/source/browse/style_examples/button2.html

Obviously, it may not be ideal, but the use of @ rules for declaration and
use seemed to fit well in the grammar at the time. Tab may have more
thoughts.


On Sun, Aug 12, 2012 at 11:40 PM, Tab Atkins Jr. <jackalmage@gmail.com>wrote:

> This is very interesting!
>
> fantasai and I had just discussed the issue of selector variables a
> few days ago, and returned to her @define rule as a useful model
> (identical to my original conception of @var declaring global
> variables).
>
> This, though, presents a very intriguing spin on that idea, where the
> definition of the variable is spread out over potentially multiple
> declarations.  This seems like it hits closer to the idea of SASS's
> @extend, which I've been wanting to give some serious thought to (at
> Chris Eppstein's repeated urging ^_^).
>
> I'm curious about the intersection of this with global variables.  If
> this claims the syntax of $foo on the global level solely for
> selectors, it prevents us from using similarly simple syntax for
> variables in MQ or elsewhere.  This might be sufficiently useful for
> that to be acceptable.
>
> I'll want to give this some thought, and discuss it with Nicole,
> Chris, and others from the community who have experience with @extend
> and similar preprocessor constructs.  Thanks for the proposal, David!
>
> ~TJ
>
>
Received on Monday, 13 August 2012 13:56:23 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:58 GMT