Stylesheet Limits Of Internet Explorer 6..9

One of my colleagues recently discovered that our site was not functioning 100% correctly (CSS styles not being respected by the browser).  After doing some investigation he found that there is a hard limit of 4,095 rules.  (Why there were so many rules on that page is another discussion).

You can find the mention of the rule limit on the Microsoft Support site.   It states the following:

This problem occurs because the following conditions are true in Internet Explorer:

  • All style tags after the first 31 style tags are not applied.
  • All style rules after the first 4,095 rules are not applied.
  • On pages that uses the @import rule to continuously import external style sheets that import other style sheets, style sheets that are more than three levels deep are ignored.

Note: IE 10 bumps up the limit to 65,534 rules.