DEV Community

loading...

Discussion on: What are your worst coding habits?

Collapse
niorad profile image
Antonio Radovcic • Edited

its not due to my own css but mostly:

  • vendor-css (from libraries etc.)
  • js-libraries which add styles to tags

I also keep a util.css file in every project, for classes like "util-no-margin" or "util-upcase", for usage in one-off constructs which don't repeat through the site. important is in all of the declarations because why not.

so personally I have nothing against important, I just consider it a bad habit because it's widely seen as "dirty" and such.

but, you know, it's just css at the end of the day.

Thread Thread
amirition profile image
Amirition

Yes, when another file is using !important, you have to use it and I completely agree that it's just css :D