0

I'm developing a rails application and I've issue when run site on IE9. All of sass files not working on IE. If I want the site run on IE9, I've sort sass files in application.scss.

I don't know why. I have been work with other rails applications in the past, this is the first time sass files require sorted.

So, is there anyone like me? Please help me.

Detail about my application:

  • Rails 4
  • Sass 3.2
  • Foundation framework latest version 5.2
  • Slim template

Ps: I've added respond.js and html5shiv.js into layout/application.

3 Answers3

2

It not SASS that is not working in IE but rather the rules that you created through it. You should check for what CSS rules are supportet by IE. A good source is http://caniuse.com/

Severin
  • 8,508
  • 14
  • 68
  • 117
  • Thanks for your answer. But I want to know why if sass files has sorted then IE 9 will work. I think when run `rails s`, it will build a file application.css. Other applications that I've work, I don't need to worry sass files when run on IE9. – Vinh Nguyen Le Xuan Mar 27 '14 at 08:35
  • I think you are missing the point here. Of course the get compiled to standard CSS and thats what giving you a hard time. So if it works in another project it is not because of SASS working correctly, but because of the rules you applied that aren't supported by IE. – Severin Mar 27 '14 at 08:37
  • Ohhhh, I don't know - because ago 3 weeks, when run site on IE9, it still work. But, when a member in my team upgrade foundation latest version. Site on IE9 not work. I'm very stress. Will try again. – Vinh Nguyen Le Xuan Mar 27 '14 at 08:47
1

IE9 still has CSS limits. If your application.css has more than 31 import links or more than 4095 rules, that's probably why you're experiencing this. If that's the case, you should definitely refactor your stylesheets.

You do have gems like CSS Splitter to deal with this, but honestly if you're running into those limits it's probably a good time to reorganize your assets.

Community
  • 1
  • 1
tirdadc
  • 4,603
  • 3
  • 38
  • 45
0

As @Severin has suggested, SASS isn't the problem - it's your CSS:

Sass is completely compatible with all versions of CSS. We take this compatibility seriously, so that you can seamlessly use any available CSS libraries

SASS is basically another way to write CSS - it's precompiled on deploy and basically renders "pure" CSS for use in the browser

Your case with IE is not likely to do with your SASS - it's probably an issue with your CSS. Can you post your application.css?

Richard Peck
  • 76,116
  • 9
  • 93
  • 147