Hacker News new | ask | show | jobs
by asjdflakjsdf 1547 days ago
I hate that the general conversation around !important is simply: "Important is bad. You should never use it".

Its more of a belief rather than knowledge at this point.

I'd be interested to hearing a good answer as to why one wouldn't use !important on a modifier class such as ".padding-20" or even something like ".full-width".

Surely the problem lies with your html composition if either of these classes are being used on an element that does not need them?

1 comments

It’s a developers version of a “wive’s tale.”

Over time, accrued wisdom has turned into a rule of thumb such that Grumpy Old Developers sit around the fire with Young Energetic Developers and say “ya know, child, never use !important, it’s bad design.”

The web development industry is getting mature enough to even have this kind of wisdom, which is wonderful, even if (like “wive’s tales”) the principle is overstated.