Hacker News new | past | comments | ask | show | jobs | submit login

Well, true. But all scenarios should be solvable via specificity alone.

I feel this is similar to saying there's absolutely nothing wrong with Goto if used correctly. The problem is when people use Goto because they don't understand other structural mechanisms.

As I said, it's just a nit that they can consider it or ignore it as they please. If this were just some web page, I would never even care. But since they encouraged me to open my DOM inspector and look at the code, I wanted them to know that I cringed when I saw the !important. That's it.




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 :)


Well, 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!


You're quite welcome. It was a fun project to work on.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: