-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prepending a selector using @at-root fails with multiple parent selectors #2135
Comments
Sass provides functions for working with selectors. Use this instead: .parent {
&:hover,
&:focus,
&:active {
.child {
@at-root #{selector-append(".ROOT", &)} {
content: 'Only the first selector gets “.ROOT” instead of all of them';
}
}
}
} |
More selector functions are documented here: http://sass-lang.com/documentation/Sass/Script/Functions.html#selector_functions |
@chriseppstein Oh, awesome, thanks! |
@chriseppstein out of curiosity...what's the use of at-root in that case then? |
@bichotll - I think you'd have to have some code that applies to these selectors except the .ROOT I for one am ecstatic to have found that this exists :) Looking forward to playing with it. |
you may try simply
This is working fine for me for multiple selectors. |
Not sure if this is intended, but would prefer
@at-root
be applied to each parent selector:SCSS
CSS
http://www.sassmeister.com/gist/f5b5db378086086f047570700621b506
The text was updated successfully, but these errors were encountered: