css3
comment 0

When to Use CSS !important Declaration?

The CSS !important declaration is used to give priority to certain styling rules or overwrite unwanted styling in a website. It is also commonly used during debugging such as in Inspect Element. But is it really OK to use !important? This question was philosophized in a blog post by web developer cum philosopher Jens Oliver Meiert. My take on this is to use !important when you know what you are doing as it can cause problems for future styling. So, don’t ever use it until you really need it and consider this as a last resort.

View More

Filed under: CSS

About the Author

Posted by

Sani Halid is a front-end developer at Stampede and is committed to clean and elegant code. Yet another gamer to join the pack, Sani is also the Editor at Constructs where he shares his daily CSS findings and other front-end development goods.

Leave a Reply