Hacker News new | ask | show | jobs
by ulkesh 3555 days ago
I agree with respect to 3rd party libraries. One of the things I hate most about Bootstrap is its amazing overuse of !important.

However, my context was mainly around architecting your own CSS, not as it relates to using someone else's.

1 comments

My approach is to slap myself in the face each time I need to use !important. That's enough to prevent me from slipping into bad habits but leaves me with an option if rewriting my CSS to work around somebody else's (or my own) hacks would be more painful than a slap in the face.

I do occasionally get strange looks from my colleagues.

Just wear a rubber band on your wrist and snap that instead. Your colleagues will just think you're trying to stop smoking.
Or get a pavlok (I have one, it's rather neat, though the bluetooth is predictably terrible).