Created
October 1, 2014 18:58
-
-
Save wingrunr21/50fcf320b62a3bf33e76 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
This file contains hidden or 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.4.4) | |
// Compass (v1.0.1) | |
// ---- | |
@mixin desc($name) { | |
@at-root &-#{$name} { @content; } | |
} | |
@mixin mod($name) { | |
@at-root &--#{$name} { @content; } | |
} | |
.Component { | |
height: 10rem; | |
@include mod(red) { color: red; } | |
@include mod(green) { color: green; } | |
@include desc(header) { | |
height: 20rem; | |
strong { | |
color:black; | |
} | |
} | |
// How do I make the header's strong red or green depending on the parent modifier | |
} |
This file contains hidden or 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
.Component { | |
height: 10rem; | |
} | |
.Component--red { | |
color: red; | |
} | |
.Component--green { | |
color: green; | |
} | |
.Component-header { | |
height: 20rem; | |
} | |
.Component-header strong { | |
color: black; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment