Skip to content

Instantly share code, notes, and snippets.

@yomotsu
Last active July 4, 2018 09:49
Show Gist options
  • Save yomotsu/9aabf91de56910e0d3e0 to your computer and use it in GitHub Desktop.
Save yomotsu/9aabf91de56910e0d3e0 to your computer and use it in GitHub Desktop.
at-root + modifier
@media screen and (max-width: 320px) {
.Notifier {
$block: &;
display: block;
&_Main {
color: green;
@at-root #{$block}.-error #{&}{
color: red;
}
}
}
}
@media screen and (max-width: 320px) {
.Notifier {
display: block;
}
.Notifier_Main {
color: green;
}
.Notifier.-error .Notifier_Main {
color: red;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment