@extend a selector without printing it #211

barraponto opened this Issue Nov 10, 2011 · 8 comments


None yet

4 participants


What I'm looking for is a way to @extend a selector without printing it.

I'm looking for this feature because I write some styles that are used several by several markups, but I don't want to tie them to any markup. Currently, I'm using classes starting with - (hyphen) since they are probably not being used in the actual markup.

@nex3 once suggested using a @quiet directive to define these non-printing classes. I thought of using _ (underscore) in the beginning of the selector, to make it consistent with partials. Either way will do.


I'm thinking of funding this feature, please let me know how much would it cost to get this coded.


I keep resorting to using mixins instead when I don't want to have them print. I'm not sure of the best practice on this.


@timplunkett resorting to mixins will print the properties everytime you @include it.
also, if you try to @include an undefined mixin it breaks compilation. if you try to @extend a class that does not exist, everything works just fine.


@barraponto, not sure that the first part is a bad thing. To the second part, I think that is a bug, see #111


The original message was received at 2011-11-27 20:05:15 +0200
from postoffice.(null) []

----- The following addresses had permanent fatal errors -----

-----Transcript of session follows -----
... while talking to postoffice.(null).:

RCPT To:gurgeva@gmail.com
<<< 550 5.1.1 unknown or illegal alias: gurgeva@gmail.com
550 gurgeva@gmail.com... User unknown


Just noticed this has already been proposed in #102 and is discussed in depth in http://blog.millermedeiros.com/2011/11/the-problem-with-css-pre-processors/


this just landed on master for sass 3.2. The feature is called "placeholder selectors".



Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment