Re: Thinking about mixins as a new type of selector

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 UTC