Let's illustrate with an example.
I want the element ::after
sort
class to be red, and blue if sort order class is desc
ending, I use the following scss.
.sort {
::after{
color: red;
}
&.desc::after {
color: blue;
}
}
Is there a way to simplify the two ::after
?
.sort::after {
color: red;
&.desc {
color: blue;
}
}
Is not ok as will be compiled to .sort::after.desc
.
What I would like to obtain is .sort.desc::after
.
Is there a way to simplify my example and remove the duplicated ::after
?