July 3, 2010

Internet Explorer limits stylesheets links to 30 could be the reason your styles are not applied

After spending several hours the other day working on the endless adaption of Internet Explorer 6 for a Drupal project, and wondering why the styles in the conditional stylesheet I had added weren’t being applied, I stumbled on a small note that IE for some reason limits the number of linked stylesheets to 30 before it stops rendering. This causes the styles in any additional stylesheets to not be applied although the stylesheet is in the code. This seems like another stupid limitation in the painfully crappy (yes, it’s a pro term) IE series of browsers.

This limit of course is not a problem on a production site where you aggregate the stylesheets but it is a pain during development since after every change you have to clear the Drupal cache.

I’m definitely going to try to find time to make a tiny module that prevents this issue, at the moment though the sun is shining and I need to clean my longboard.