Grow your CSS skills. Land your dream job.

Performance of !important

  • # March 6, 2013 at 12:34 pm

    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?

    # March 6, 2013 at 1:25 pm

    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:
    < http://isobar-idev.github.com/code-standards/#_calculating_specificity>

    # March 6, 2013 at 2:59 pm

    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.

    # March 8, 2013 at 1:14 am

    Thanks guys! And thank you Emil for the link.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".