Created
December 9, 2014 22:06
-
-
Save jtwalters/2bb9e398c403e5bfe061 to your computer and use it in GitHub Desktop.
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
// Cross-scope compatible placeholder boilerplate. | |
@mixin my-mixin($extend: true) { | |
@if $extend { | |
@extend %my-mixin; | |
} | |
@else { | |
// Mixin core | |
} | |
} | |
%my-mixin { | |
@include my-mixin($extend: false); | |
} | |
// Example usage. | |
.my-class { | |
@include my-mixin; | |
} | |
@media (min-width: 48em) { | |
.c { | |
@include my-mixin(false); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment