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

前端 未结 6 1060
借酒劲吻你
借酒劲吻你 2020-11-27 18:07

In an answer about CSS, a user said:

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

6条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-11-27 18:14

    I was building a site and hit this issue myself. It was driving me batty until a co-worker pointed this 31 CSS files issue out. Looking into it what struck me that it's more complicated than that because IE8 seemed to be loading some of the styles from the sheet but not all of them. It was ignoring media queries and chained classes just like it was behaving in Quirks mode — even though it wasn't in Quirks mode and both those were in the same CSS file as other CSS that was being used. Once I aggregated the CSS files into one file it all worked fine. Anyway I just wanted to point out that somehow this 31 limit also seems to trigger something like Quirks mode.

提交回复
热议问题