Created
November 1, 2016 17:48
-
-
Save jonnymaceachern/643ebe75aca596d01e57f7c406df94e8 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
// Mixin for alternate theme styling | |
@mixin theme( $blogname ){ | |
body.theme-#{$blogname} & { | |
@content; | |
} | |
} | |
// Usage | |
.header { | |
color: #000; | |
background: #fff; | |
@include theme('autumn') { | |
color: #fff; | |
background: #000; | |
} | |
} | |
// Output | |
.header { | |
color: #000; | |
background: #fff; | |
} | |
body.theme-autumn .header { | |
color: #fff; | |
background: #000; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment