интеграция materializecss framework rails 4.2

Я нашел эту структуру css, к сожалению, в ней отсутствует поддержка драгоценных камней, как в Twitter bootstrap.

Поэтому я скачал их исходный код sass и попытался интегрировать в конвейер ресурсов rails, хотя и с ошибками.

Undefined variable: "$button-height".
  (in /app/assets/stylesheets/components/_buttons.scss:4)

Или я должен поместить это в папку /lib?введите здесь описание изображения

Мой вопрос: как установить этот фреймворк с rails 4.2?


person The questioner    schedule 27.01.2015    source источник


Ответы (2)


Вы можете использовать bower или использовать этот гем https://github.com/mkhairi/materialize-sass.

У меня были некоторые проблемы с материализацией шрифтов с помощью Bower, я предлагаю использовать драгоценный камень =)

person ffscalco    schedule 28.01.2015

Я нашел решение, добавив драгоценный камень в Gemfile

просто делать:

gem 'materialize-sass'

и обновите Gems, найдите в своих ресурсах/таблицах стилей файл apps.css, если у вас есть расширение «.css», которое вам нужно, переименуйте его в applications.scss и, наконец, добавьте этот импорт @import "материализоваться";

/*
 * This is a manifest file that'll be compiled into application.scss, which will include all the files
 * listed below.
 *
 * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
 * or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any styles
 * defined in the other CSS/SCSS files in this directory. It is generally better to create a new
 * file per style scope.
 *
 *= require_tree .
 *= require_self
 */
 @import "materialize";

:)

person Yan Shum    schedule 22.03.2016