4 ms·
Stylesheet Limits in Internet Explorer (2011)
- jchw 7y agoSounds like, based on the comments, these limitations trace all the way back to the beginning of CSS support in IE. It was probably reasonable at the time and I’m not really sure who could’ve expected the explosion in complexity that ended up happening later; at the time stylesheets were used in a much more straightforward manner - I remember some sites let you select between multiple stylesheets!
- elliekelly 7y agoI wonder how long it would take IE 10 to render a page with 4095 style sheets that each have 65534 selectors?
- folkhack 7y agoIf anyone hits this the tactic to overcome it is called "blessing" the CSS: https://github.com/BlessCSS/bless https://github.com/BlessCSS/bless It's a giant pain but if you're running highly complex sites that have to work in old IEs then this may be something you want to implement. Often you see the need for stuff like this when pulling in frameworks like Bootstrap, etc. Haven't had to do this for years (thank goodness) but depending on market, etc. IE9 still rears it's ugly head sometimes.
- bmm6o 7y agoI ran into this when we concatenated our css so all the styling would load with one round trip. No warning in the console, IE just ignored the rules after the 4095th. And because the concatenation was a build step you wouldn't normally see the problem in a dev build. Good times.