Answer the question
In order to leave comments, you need to log in
How to effectively use SASS with modifiers?
There is a panel .panel, it has inactive .panel__button and active .panel__button_active buttons. I write like this:
.panel {
//...
&__button {
//...
&_active {
@extend &;
background: yellow;
}
}
}
Answer the question
In order to leave comments, you need to log in
Happened:
.panel {
//...
&__button {
//...
$this: &;
&_active {
@extend #{$this};
background: yellow;
}
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question