Answer the question
In order to leave comments, you need to log in
How to get rid of redundant inheritance in scss?
Hello.
I have a button class, a button element, and an input with a button type. .btn, button, [type="button"] {}
There are also a few elements that inherit from .btn
. As a result, when I try to use a:not(.btn)
, I get a whole huge footcloth that does not work because nested selectors are wedged.
a:not(.btn):not(button):not(.fine .select):not([type=button])
.newClass {
display: inline-block;
}
.fancy {
.select {
@extend .newClass;
}
}
.label:not(.newClass) {
display: block;
}
.newClass,.fancy .select {
display: inline-block
}
.label:not(.newClass):not(.fancy .select) {
display: block
}
Answer the question
In order to leave comments, you need to log in
Either the question is not well-posed, or it looks like nonsense
.label.newClass{ display: inline-block; }
.label{ display: block; }
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question