Answer the question
In order to leave comments, you need to log in
How to solve ampersand problem in sass?
Good evening. Colleagues, faced with the task of making the theme of the site. Googling found a suitable mixin. Everything would work fine if it weren't for the event mixin. It turns out that I need to do something so that if the theme mixin is called in the event mixin, then the class does not cascade, but is substituted for the theme class, the .no-touchevents class hangs on the html tag. I'd appreciate it if you could help sort this out.
Example
Ideally, the output would be like this:
.card {
color: #fff;
}
.t-dark .card {
color: #000;
}
.no-touchevents .card:hover {
color: #000;
}
.t-dark.no-touchevents .card:hover {
color: #fff;
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question