Last active
April 3, 2017 11:49
-
-
Save bichotll/cfdf0b1ce925e538e3dd5bb373d35b7c to your computer and use it in GitHub Desktop.
Proper at-root on multiple elements - Generated by SassMeister.com.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ---- | |
// 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'; | |
} | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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