Does using !important in your CSS have any negative effects on performance? Is it better to avoid them at all costs, even if it means longer, yet more specific rules in your stylesheets?
I don’t think there is any performance impact, but you should generally try to avoid !important and use specificity to your advantage. More here:
No negative effect on performance but it does have a negative effect on maintainability. If you need really long selectors just to get more specificity, you might wanna look into optimizing your selectors and rules.
Thanks guys! And thank you Emil for the link.
You must be logged in to reply to this topic.
*May or may not contain any actual "CSS" or "Tricks".