Answer the question
In order to leave comments, you need to log in
How to rewrite scss correctly?
Please help me to correctly rewrite the lower example in scss
.test {
&:hover {
/* вот сюда */
}
&__title,
&__name{
color: green;
}
}
/* вот этот код расписать в код выше */
.test:hover .test__title,
.test:hover .test__name{
color: red;
}
Answer the question
In order to leave comments, you need to log in
.test{
$root: &;
&:hover{
#{$root}__title,
#{$root}__name{
color: red;
}
}
}
.test {
&:hover &__title {
}
&:hover &__name{
}
}
.test {
&:hover {
.test__title{}
.test__name{}
}
}
.test {
&__name {
color: red;
}
&:hover & {
&__name {
color: green;
}
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question