Created
January 8, 2014 13:58
-
-
Save napotopia/8317122 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
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
// ---- | |
// Sass (v3.3.0.rc.1) | |
// Compass (v0.13.alpha.10) | |
// ---- | |
/** | |
* Generate a solid class (for use in markup) and a silent class (for use with | |
* `@extend`) in one go. | |
*/ | |
@mixin class($name) { | |
.#{$name}, | |
%#{$name} { | |
@content | |
} | |
} | |
@include class(foo) { | |
color: red; | |
&:hover { | |
color: black; | |
} | |
} | |
@include class(foo--bar) { | |
font-weight: bold; | |
} | |
.bar { | |
@extend %foo; | |
@extend %foo--bar; | |
} |
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
/** | |
* Generate a solid class (for use in markup) and a silent class (for use with | |
* `@extend`) in one go. | |
*/ | |
.foo, | |
.bar { | |
color: red; | |
} | |
.foo:hover, | |
.bar:hover { | |
color: black; | |
} | |
.foo--bar, | |
.bar { | |
font-weight: bold; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment