sass: IE has limit of 4095 selectors in a CSS file -- sass should warn or throw optional exception

We recently ran into a bug where IE ignores everything after the 4095th selector in a css file. We were using @extend extensively for lots of styles (which can create lots of css selectors) and unwittingly ran into the problem of having more selectors than the IE limit. We didn’t know about the 4095 limit, so it took a lot of time tracking down why IE seemed to ignore a small percentage of our styles, and why rearranging the stylesheet fixed some bugs but caused others.

http://marc.baffl.co.uk/browser_bugs/css-selector-limit/ demonstrates the bug.

It might be good for Sass to warn about this limit if there’s more than 4095 selectors in a generated file. Or even throw an exception (that could be turned off).

About this issue

  • Original URL
  • State: closed
  • Created 12 years ago
  • Comments: 20 (1 by maintainers)

Most upvoted comments

One of my projects may be of use here. Website and GitHub repo.

If there’s a demand I’m happy to port it to Sass.