The*_*ner 1 ruby-on-rails css-frameworks asset-pipeline ruby-on-rails-4
我发现这个 css框架,遗憾的是,它缺乏像Twitter bootstrap那样的gem支持.
所以我下载了他们的sass源并尝试集成到rails资产管道,尽管有错误.
Undefined variable: "$button-height".
(in /app/assets/stylesheets/components/_buttons.scss:4)
Run Code Online (Sandbox Code Playgroud)
或者我应该把它放入/ lib文件夹?
我的问题是:如何使用rails 4.2安装此框架?
小智 5
我找到了将gem添加到Gemfile中的解决方案
做就是了:
gem 'materialize-sass'
Run Code Online (Sandbox Code Playgroud)
并更新Gems,搜索您的assets/stylesheets applications.css如果你有".css"扩展名,你需要将它重命名为applications.scss,最后添加这个import @import"materialize";
/*
* 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";
Run Code Online (Sandbox Code Playgroud)
:)
| 归档时间: |
|
| 查看次数: |
3678 次 |
| 最近记录: |