23
Comments
  • 2
    I have to admit I have done this before too...
  • 2
    @krazy-dev haven't we all?
  • 0
    Is it bad?
  • 0
    is it really bad cause sometimes it becomes a necessaty
  • 1
    saves my neck every time but its a lazy way for fixing css try to change the orignal if you could find it
  • 1
    @aram it depends... If it is a library, the last thing you wanna do is to modify the original code. If the css is a custom code (maybe some other dev) it is ok to modify it, just make sure you didn't broke anything :)
  • 1
    I feel ya ! but you had a deadline to meet ! and at the end of the day, that's what's
    !important

    Another messy trick I use to avoid !important: .hack.hack.hack.hack
    and call it a day B)
  • 3
    It's bad if it's unnecessary. It can be useful in couple of cases like where you are overriding a Bootstrap class.
  • 0
    It's bad, but it's a last-resort.

    At least it gets the job done
  • 1
    Feels like I'm putting a pillow on my websites face.

    "Shh, shh, you will be a green box and we will all be a happy happy family"
  • 0
    I sometimes do it when client asks for creating different themes and they think it is just changing some colours.
  • 1
    In JavaScript !important means not important.
  • 0
    You can override framework CSS by putting your own sheet after the original. Unless they used !important, in which case you're doomed. And that's essentially the problem, !important screws up the cascading nature of CSS.
  • 0
    Need to override CSS? Find an ID that wraps it or mention body before the class. Many ways to go about it before resorting to important
Add Comment