Created
September 13, 2021 21:39
-
-
Save marcelmoreau/392a87a8f2a3b8dec2702ab2d62a9929 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
.dan { | |
&__body { | |
background-color: gold; | |
} | |
// I want to target .dan__body when it is a child of the .dan--dark modifier | |
&--dark { | |
&__body { | |
background-color: lightgray; | |
} | |
} | |
} | |
.marcel { | |
$b: &; | |
&__body { | |
background-color: peru; | |
} | |
&--dark { | |
#{$b}__body { | |
background-color: aliceblue; | |
} | |
} | |
} | |
/* I just dislike doing this: */ | |
.rachel { | |
&__body { | |
background-color: gold; | |
} | |
&--dark { | |
.rachel__body { | |
background-color: orange; | |
} | |
} | |
} |
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
.dan__body { | |
background-color: gold; | |
} | |
.dan--dark__body { | |
background-color: lightgray; | |
} | |
.marcel__body { | |
background-color: peru; | |
} | |
.marcel--dark .marcel__body { | |
background-color: aliceblue; | |
} | |
/* I just dislike doing this: */ | |
.rachel__body { | |
background-color: gold; | |
} | |
.rachel--dark .rachel__body { | |
background-color: orange; | |
} |
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": { | |
"compiler": "dart-sass/1.32.12", | |
"extensions": {}, | |
"syntax": "SCSS", | |
"outputStyle": "expanded" | |
}, | |
"autoprefixer": false | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment