Created
June 17, 2014 00:01
-
-
Save Lochlan/a819677a152b04f05913 to your computer and use it in GitHub Desktop.
Generated compound selectors in Sass 3.3
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.8) | |
// Compass (v1.0.0.alpha.19) | |
// ---- | |
@mixin element-compound($selector) { | |
$elements: a, p, div; | |
@each $el in $elements { | |
@at-root #{$el + $selector} { | |
@extend #{$selector}; | |
} | |
} | |
} | |
.foo { | |
@include element-compound(".foo"); | |
content: 'hiya'; | |
} |
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
.foo, a.foo, p.foo, div.foo { | |
content: 'hiya'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment