Skip to content

Instantly share code, notes, and snippets.

@scheibome
Created May 23, 2021 09:58
Show Gist options
  • Select an option

  • Save scheibome/463c5d3c5aa2bbcc26a9ba6c0503c4a6 to your computer and use it in GitHub Desktop.

Select an option

Save scheibome/463c5d3c5aa2bbcc26a9ba6c0503c4a6 to your computer and use it in GitHub Desktop.
Use scss @at-root
.message > li {
background-color: green;
}
.message--error.message > li {
background-color: red;
}
.message {
> li {
@at-root & {
background-color: green;
}
@at-root .message--error#{&} {
background-color: red;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment