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?
I have a large CSS file for which I would like to add !important
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If your goal is to override styles by importing another stylesheet, you should use the order of precedence.
Here the
style.cssis the original andstyle-override.csswould contain your new custom css. These styles will override the styles fromstyle.css. This means you won’t need to use!importantbecause the style is overwritten.Alternatively you could add in a CSS reset to remove all styles and build on-top of that.
Check out a CSS reset at http://meyerweb.com/eric/tools/css/reset/ and add it to reset.css.