40
lxmcf
6y

Anyone else feel really dirty when you use !important in css or just me?

Nope, just me...

Comments
  • 2
    Only if it's used more than twice.
  • 2
    @Stuxnet Then i am very very dirty in that case haha
  • 8
    Only if I'm editing my own css, if it's other people, than I spam it
  • 3
    @devTea Well that makes me feel a bit better, im using googles MDL and adding the ability to have a dark and light theme so just brute forcing some of the theming by using it
  • 2
    @lxmcf If I'm using something like bootstrap for class, that shit is getting used all the time.

    Hell, I'm pretty sure I did use it all the time on my big project for class. Had to change the colors of things that were predefined and looked like shit.

    (I also made light and dark theme lol, but it never needed important)
  • 1
    I don't really see the point, I write all my CSS in style attributes 🙃
  • 3
  • 6
    @CodeAlex Of course. Mostly to piss of the front end department because they never have their designs ready on time.
  • 0
    Using CSS !important is like using goto instructions.

    Say no to !important.

    Unless you really don't have a choice because your CSS is FUBAR.
  • 6
    !important is reserved for the userstyles here, where you actually want to override stuff no matter what.. if it's used in the CSS provided by a webpage however, I'd jam an inch of steel pole up that front-end dev's ass for every occurrence of !important in their crappy website!
  • 1
    @bittersweet yay i dun't feel alone anymore
Add Comment