Skip to content

Instantly share code, notes, and snippets.

@marcelmoreau
Created November 12, 2021 16:31
Show Gist options
  • Save marcelmoreau/276e16ad9674ffbfbfc433e50feeeed9 to your computer and use it in GitHub Desktop.
Save marcelmoreau/276e16ad9674ffbfbfc433e50feeeed9 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
.widget {
$b: &;
&__heading {
color: navyblue;
}
// bad – does not evaluate to what we want
&--halloween {
&__heading {
color: black;
}
}
// good
&--halloween {
#{$b}__heading {
color: orange;
}
}
}
.widget__heading {
color: navyblue;
}
.widget--halloween__heading {
color: black;
}
.widget--halloween .widget__heading {
color: orange;
}
{
"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