DEfusion
DEfusion

Reputation: 5613

Rails 3.1 Asset pipeline - IE not loading all stylesheets in development

Testing my site in Internet Explorer (testing with IE 9 at the moment) I saw many things wrong but quite a few things that I thought shouldn't be wrong.

It turns out that IE isn't applying all the stylesheets in development mode (verified by adding a body { border: 10px solid blue; } rule to one of the stylesheets).

I've opened up the development tools and done network capturing and it reports they're all loaded (result: 304).

I've tried running the server both through Webrick & thin.

Only thing I can think is it's just too many stylesheets for IE to cope with. The only way I've got it to work is by pre-compiling the assets and running the server in production mode. But this is of course far from ideal.

Upvotes: 4

Views: 1703

Answers (2)

tomek
tomek

Reputation: 758

Certain comments inside css files can also prevent them from loading in IE6 and IE7 (IE8 seems ok). Comments with quotes, like for a font style, will prevent it from loading.

A comment such as the one below, with quotes inside, will prevent the file from loading:

/* ‘Lucida Sans Unicode’ */

Upvotes: 2

DEfusion
DEfusion

Reputation: 5613

Yuck IE imposes a 31 stylesheet limit: http://social.msdn.microsoft.com/Forums/en-US/iewebdevelopment/thread/ad1b6e88-bbfa-4cc4-9e95-3889b82a7c1d/

The only way I found around this in development is to change my settings to:

config.assets.compile = true
config.assets.debug = false

Upvotes: 9

Related Questions