Skip to content

Instantly share code, notes, and snippets.

@bichotll
Last active April 3, 2017 11:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bichotll/cfdf0b1ce925e538e3dd5bb373d35b7c to your computer and use it in GitHub Desktop.
Save bichotll/cfdf0b1ce925e538e3dd5bb373d35b7c to your computer and use it in GitHub Desktop.
Proper at-root on multiple elements - Generated by SassMeister.com.
// ----
// Sass (v3.4.21)
// Compass (v1.0.3)
// ----
.parent {
&:hover,
&:focus,
&:active {
.child {
@at-root #{selector-nest(".ROOT", &)} {
content: 'Only the first selector gets “.ROOT” instead of all of them';
}
}
}
}
@charset "UTF-8";
.ROOT .parent:hover .child, .ROOT .parent:focus .child, .ROOT .parent:active .child {
content: 'Only the first selector gets “.ROOT” instead of all of them';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment