You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using some external scss file. Let's assume I want to isolate the external styles to work only for elements that are wrapped in some additional element. In effect, I end up with
.my-wrapper {
@import"external";
}
In general this works ok, until trailing ampersand selector happens to be used in external styles. We then end up with a structure like this:
Of course current behavior is correct, but it seems that currently there is no way to achieve what I wanted without editing external.scss. I tried experimenting with @at-root but it removes .my-wrapper completely from the selector chain. A directive similar to @at-root might be needed to do that. So I can type something like this:
I am using some external
scss
file. Let's assume I want to isolate the external styles to work only for elements that are wrapped in some additional element. In effect, I end up withIn general this works ok, until trailing ampersand selector happens to be used in external styles. We then end up with a structure like this:
which in turn gets compiled to this:
while in fact I wanted to achieve this:
Of course current behavior is correct, but it seems that currently there is no way to achieve what I wanted without editing
external.scss
. I tried experimenting with@at-root
but it removes.my-wrapper
completely from the selector chain. A directive similar to@at-root
might be needed to do that. So I can type something like this:which will cause
&
to not see the part of parent selector that happened before@reset-parent
but still be output as style inside the wrapper.The text was updated successfully, but these errors were encountered: