Created
April 17, 2012 15:11
-
-
Save chriseppstein/2406649 to your computer and use it in GitHub Desktop.
If you have a module with placeholder selectors, this pattern will help you avoid outputting them twice if imported twice.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$module-placeholders-defined: false !default; | |
@mixin module-placeholders { | |
@if not $module-placeholders-defined { | |
$module-placeholders-defined: true; | |
%module-object { color: red; } | |
%module-object:hover { color: blue; } | |
} | |
} | |
@include module-placeholders; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@chriseppstein
Thank you for letting me know a good way! It's very useful.
But, If I use this with extend, it's not so much beautiful...
Do you know a better way?(any sass version ok,)