16

Every time you use an unnecessary !important in css code, God kills a cat :(

Please don't use !important if it's not necessary.

Comments
  • 4
    I always find that ironic since in most programming ! means not so really we are saying not important 😂
  • 1
    !important is probably my favorite code when I want to mess with people 😂
  • 2
    At my previous job, all instances of !important or other hacky css had to go in a file called hacks.css with an explanation of why it was necessary, and ideas for removing it in the future.

    It worked pretty well. Put all your junk in one place. When it gets too big, reserve some sprint time to reduce it.
  • 0
    Specificity is !important
  • 1
    @cjhowald It looks pretty awesome! I like it! I will try to avoid the !important. But if I couldn't I will do as you said.

    Thanks!
Add Comment