I have a large CSS file for which I would like to add !important
to every CSS property. Is there one-line shortcut to make a whole .css file !important
No. Also, don't overuse !important
: it should be a last resort. The effect of applying !important
to all CSS declarations is equivalent to having no !important
added to each declaration.
Use more specific selectors (#id
) instead of adding !important
if you want a certain property to take precedence.