Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does IE 8 have a limit on number of stylesheets per page?

In an answer about CSS, a user said:

Internet Explorer has is said to have a limit of 4096 CSS rules per file. Reference

Also, it has a limit on the number of style sheets you can embed in a single document. I think it is 20.

While the reference on MSDN seems to confirm this (and there's a blog post which confirms this in IE7), is this still the case for IE8?

like image 803
Piskvor left the building Avatar asked Jul 09 '10 11:07

Piskvor left the building


2 Answers

Yes, IE8 (and even IE9 apparently) limit the number of style sheets to 31 per page.

Telerik has an article and test page which demonstrate the issue. According to comments in the same article, the 4096 rules per file limitation has been marked as Won't Fix in Microsoft Connect but I've been unable to verify that.

like image 170
Chris Van Opstal Avatar answered Nov 10 '22 03:11

Chris Van Opstal


This thread suggests there is a limit of 31 CSS references per page/CSS file but that you can achieve more than that by using @import and a nested hierarchy of CSS files.

More info from a Telerik blog on the issue making it clearer that this applies to IE8.

like image 35
Daniel Renshaw Avatar answered Nov 10 '22 03:11

Daniel Renshaw