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?
-
This is a vague question. What else can you tell us? – Cthulhu Jun 18 '12 at 10:02
-
2It seems that somebody else has had the same problem, please check stackoverflow.com/a/3212065/795876 – fsenart Jun 18 '12 at 10:03
-
@fsehat thanks for the link, that didn't come up in my previous searches unfortunately – Paul Sheldrake Jun 18 '12 at 10:12
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:
-
17To notice, IE10 doesn't have this limit (including when in IE7-8-9 modes) – Evgenyt Dec 6 '12 at 14:24
-
11there's a ~288kb file max too. Info: joshua.perina.com/africa/gambia/fajara/post/… – RaphaelDDL May 24 '13 at 21:03
-
1@RaphaelDDL I don't think that link should be taken at face value. I regularly see larger files. The link author probably hit the selector limit. – noah Jul 3 '13 at 16:07
-
@noah I've had cases files around that size have failed while still being below the other limits. Splitting into multiple files fixed the problem so it's worth checking out. – Andrew Pietsch Jan 10 '14 at 11:05
-
1