susy, media queries, and lt IE9 [closed]

巧了我就是萌 提交于 2019-12-22 00:05:20

问题


I was wondering what (if any) shims you use to get the magic grids to respond correctly in SUSY in IE8 and under?

On non-susy sites I've always used moderizr or the shim from google and they worked as expected. I'm working on my first SUSY site and the media queries for the largest size won't kick in.

http://dev.apehangar.com


回答1:


It's not clear to me what sort of "shim" you are looking for. I don't know any good way to make MQs work in IE8, but Susy does have an option to output styles under a fallback class. Those styles wont respond dynamically, but you can use it to send IE a desktop site:

.page {
  width: 20em;
  @include at-breakpoint(30em 12 no-mediaqueries) {
    width: 70em;
  }
}

Will output:

.page { width: 20em; }
@media (min-width: 30em) { .page { width: 70em; } }
.no-mediaqueries .page { width: 70em; }

You can replace "no-mediaqueries" with any fallback class you want. Just make sure that class is applied using Modernizr or IE conditional comments.



来源:https://stackoverflow.com/questions/12899945/susy-media-queries-and-lt-ie9

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!