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

Re: Thinking about mixins as a new type of selector

From: Pete Boere <pete@the-echoplex.net>
Date: Thu, 16 Aug 2012 11:31:08 +0100
Message-ID: <CAKZZz6cd_b_=rmv-9+9Weej3=Mxqpby_frO1V8juTUDUaT5wvg@mail.gmail.com>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
Cc: Chris Eppstein <chris@eppsteins.net>, Brian Kardell <bkardell@gmail.com>, www-style@w3.org, "L. David Baron" <dbaron@dbaron.org>
Is there any reason mixins/extends shouldn't use property syntax?

Since variables will be using property:value notation, why not use it for
this use-case as well.

Examples of this from my preprocessor implementation:

https://github.com/peteboere/css-crush/wiki/Rule-inheritance
https://github.com/peteboere/css-crush/wiki/Mixins



On 16 August 2012 08:54, Tab Atkins Jr. <jackalmage@gmail.com> wrote:

> On Wed, Aug 15, 2012 at 7:45 PM, Chris Eppstein <chris@eppsteins.net>
> wrote:
> > One thing to note is that in Sass 3.2 (released last week) we have
> > introduced a new feature for use with @extend called placeholder
> selectors.
> >
> > A placeholder selector is like a class, but it would not become part of
> the
> > generated CSS (or in a native implementation, cannot be used to match
> > against the document). We denote a placeholder selector with %.
> >
> > Near as I can tell, this is exactly what the $ syntax proposed by David
> is
> > doing. (hard to tell -- I keep thinking it's a shell variable :P)
>
> No, as I noted, David's proposed syntax is exactly equivalent to
> @extend.  (This may not be obvious from the examples he provided, but
> I checked his expectations in person, and they match what @extend
> would do.)
>
> ~TJ
>
>


-- 
Pete Boere
Web Developer
Received on Thursday, 16 August 2012 10:31:34 GMT

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