3 ms·
I disagree. In classes that are supposed to be global helpers/modifiers, it makes absolute sense to use `!important`. For example, if I have the utility class
by philipwalton 13y ago
I disagree.
In classes that are supposed to be global helpers/modifiers, it makes absolute sense to use `!important`. For example, if I have the utility class `.u-hidden`, that selector has very low specificity. But if want to be damn sure that anything I put that class on gets hidden. There's no way to use specificity in this case because it's generalized for use on any website.
This is a common pattern seen in most well architected CSS libraries today.
BTW, I am the they you were referring to :)
- bhauer 13y agoWell, in that case, I retract the comment. The work you've done in demonstrating Flexbox is too valuable to suffer pedantic and (as you point out, ultimately not even necessary) points about !important. Thanks again for the work!
- philipwalton 13y agoYou're quite welcome. It was a fun project to work on.