Read more

Limitations you should be aware of when Internet Explorer 9 parses CSS files

Ulrich Berkmueller
August 24, 2012Software engineer

Internet Explorer until version 9 has some limitations when parsing CSS files Show archive.org snapshot

Illustration money motivation

Opscomplete powered by makandra brand

Save money by migrating from AWS to our fully managed hosting in Germany.

  • Trusted by over 100 customers
  • Ready to use with Ruby, Node.js, PHP
  • Proactive management by operations experts
Read more Show archive.org snapshot

Summarized, these are:

  • Up to 31 CSS files or tags per page.
  • Up to 4095 selectors per CSS file.
  • Up to 3 nested @import rules

To test the selector limit for a specific browser, check this CSS selector limitation test website Show archive.org snapshot .

When you run into this issue, the following links might be helpful to fix the problem. The Idea is to split up the css files that have been generated by sass.

  • https://gist.github.com/3099975
  • https://groups.google.com/forum/?fromgroups=#!topic/compass-users/wcj7LohiuR0
  • http://stackoverflow.com/questions/6953345/sass-dealing-with-the-ie-4095-selectors-per-stylesheet-restriction

Some websites (e.g. https://www.devexpress.com/Support/Center/p/K18487.aspx) say there was a css file size limit at about 288kb but this is neither listed in the microsoft knowledge base article Show archive.org snapshot nor could this bug be reproduced. I think people ran into the selector limit. If you have a test that approves the file size limit, please give me a shout.

Arne added a repository Show archive.org snapshot that holds a few sample files so you can test it yourself.

Posted by Ulrich Berkmueller to makandra dev (2012-08-24 10:11)