Comment

Comment by dhcar

The author does mention that "It is also used a lot when you are including a CSS framework with very specific rules and it’s just too hard to override them." Which seems like a perfectly valid use case for !important.

In my experience working with a lot of CSS frameworks there are times where not using !important would make the site too brittle if layout had to be changed.

When it comes down to abusing selector nesting vs using !important, use !important.

parent dhcar 10 years ago

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton