Skip to content

Instantly share code, notes, and snippets.

@marcelmoreau
Created September 13, 2021 21:37
Show Gist options
  • Save marcelmoreau/dfa0c41ae025f753781e770f00cd4586 to your computer and use it in GitHub Desktop.
Save marcelmoreau/dfa0c41ae025f753781e770f00cd4586 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
.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;
}
}
}
.dan__body {
background-color: gold;
}
.dan--dark__body {
background-color: lightgray;
}
.marcel__body {
background-color: peru;
}
.marcel--dark .marcel__body {
background-color: aliceblue;
}
{
"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