Does IE9 have a file size limit for CSS?

I'm using Drupal and I notice that if I have my CSS files aggregated that the CSS doesn't always work correctly. I know there is a problem in IE7 but is there a limit to a CSS file size in IE9?


Solution 1:

There are 3 limits:

  • a sheet may contain up to 4095 selectors, see http://demos.telerik.com/testcases/4095issues.html
  • a sheet may @import up to 31 sheets, see http://demos.telerik.com/testcases/BrokenTheme.aspx
  • @import nesting supports up to 4 levels deep

Microsoft support/MSDN reference links:

http://support.microsoft.com/kb/262161

http://blogs.msdn.com/b/ieinternals/archive/2011/05/14/internet-explorer-stylesheet-rule-selector-import-sheet-limit-maximum.aspx