Я пытаюсь загрузить CSS-фреймворк Blueprint в мое приложение Rails 3.1.
В Rails 3.0+ у меня было бы что-то подобное в моих views / layouts / application.html.erb:
<%= stylesheet_link_tag 'blueprint/screen', 'application' %>
<%= stylesheet_link_tag 'blueprint/print', 'media' => 'print' %>
<!--[if lt IE 8]>
<%= stylesheet_link_tag 'blueprint/ie' %>
<![endif]-->
Однако в Rails 3.1 теперь используется SASS. Как правильно загрузить эти CSS-файлы Blueprint?
В настоящее время у меня есть каталог dir в приложении / assets / stylesheets /
Мое приложение / assets / stylesheets / application.css выглядит так:
/*
* This is a manifest file that'll automatically include all the stylesheets available in this directory
* and any sub-directories. You're free to add application-wide styles to this file and they'll appear at
* the top of the compiled file, but it's generally better to create a new file per style scope.
*= require_self
*= require_tree .
*/
Должен ли я что-то делать с application.css, чтобы он загружал необходимые файлы Blueprint? Если да, то как?
Во-вторых, как бы я предоставил какое-то условие для проверки IE8, чтобы загрузить blueprint / ie.css?
EDIT:
Хммм, перезагрузите веб-страницу приложения снова. Rails 3.1 содержит файлы Blueprint. Даже если файлы CSS находятся в папке (в данном случае: app / assets / stylesheets / blueprint.)
Что оставляет мне два вопроса
- Как применить условие if lt IE 8 , используя SASS?
- Как загрузить файл css для формата печати (т.е. <% = stylesheet_link_tag 'blueprint / print', 'media' => 'print'%>), используя SASS?