Answer the question
In order to leave comments, you need to log in
How to hover a parent element so that the child changes in SCSS?
How to write correctly so that the color of box-1 changes?
https://skr.sh/s5mQNSBqDlD
Answer the question
In order to leave comments, you need to log in
because & is already different. do like this:
&:hover {
.main__box-1 {}
}
.main {
$v: &;
&:hover {
#{$v}__box-1 {
background: #000;
}
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question