DEV Community

loading...

Discussion on: Is it really !important?

Collapse
sebastianstamm profile image
Sebastian Stamm

I came across a scenario where we had to use !important to apply styling.

We were using a library that created elements with inline-styles. We wanted to overwrite the default (inline) styles of the library, so other than forking the library or adjusting the inline style with Javascript, !important was our only option.

Collapse
kaylasween profile image
Kayla Sween Author

Overriding styles from external libraries wasn’t on my mind when I wrote this, but that is a good case to use !important. Thanks!