Created
September 13, 2021 21:37
-
-
Save marcelmoreau/dfa0c41ae025f753781e770f00cd4586 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 --dark modifier | |
&--dark { | |
&__body { | |
background-color: lightgray; | |
} | |
} | |
} | |
.marcel { | |
$b: &; | |
&__body { | |
background-color: peru; | |
} | |
&--dark { | |
#{$b}__body { | |
background-color: aliceblue; | |
} | |
} | |
} | |
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; | |
} |
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