18

When you start writing CSS yourself, and every style is

! important

Comments
  • 1
    Nooooo 😱
  • 0
    I only used important for handful of the rules. Never found myself writing them one after another. Instant articles for instance require you to write important free CSS.
  • 3
    I can't remember the last time I wrote important
  • 1
    if I knew what's the right way, I wouldn't be ranting.
  • 1
    @tirthaguha Nesting is an alternative. This is where preprocessors such as SASS come into their element
    There's also the easiest option of changing the order in the stylesheet. Styles at the bottom overwrite those at the top
  • 1
    Sometimes, I need use !important for override bad WordPress plugin styling whose inject css in style attributes in tag.

    This things make me sad. But don't have choice 😢
  • 0
    @Purexo That's also how responsive emails work :(
  • 1
    I actually found some "!important" in the product I'm working on. Asked and was replied that it's the problem of the framework we'r using. Anyway I tried my best to avoid using it.
Add Comment