Given an element with some style and an additional class ( mywidget_button - disabled ), which works as a BEM modifier, it makes sense, as a practice, to use an important sentence?
.mywidget__default ~ .mywidget__button {
border: 1px solid #000;
}
.mywidget__button--disabled {
border: 1px solid transparent !important;
}
The first class is more specific and wins the second, but being a disconnection class, a modifier that (theoretically) should have a higher priority than the "general" style, is it right to rely on an important proposal?
Or does this make the code prone to spaghetti headache?
source
share