【发布时间】:2013-01-05 21:04:59
【问题描述】:
我尝试使用 bootswatch-rails,但效果不佳,例如,按钮显示不正确,不像 bootwatch 网站上那样显示。
我将 bootstrap-sass 和 bootswatch 放入我的 gemfile 并捆绑安装
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
gem 'bootswatch-rails', '>=0.2.0'
gem 'uglifier', '>= 1.0.3'
end
gem 'bootstrap-sass', '>= 2.1.0.0'
在我的 bootstrap_and_overrides.css.scss 文件中看起来像这样
// First import journal variables
@import "bootswatch/cerulean/variables";
// Then bootstrap itself
@import "bootstrap";
// Responsive styles go here in case you want them
@import "bootstrap-responsive";
// And finally bootswatch style itself
@import "bootswatch/cerulean/bootswatch";
我真的不知道我做错了什么。
【问题讨论】:
-
您的 application.css 中是否导入了 bootstrap_and_overrides.css.scss?或者以不同的方式问...向我们展示您的 application.css 中的 cmets
-
我有不同的布局。在这种情况下,我使用 home_layout.html.erb 并创建 home.css.scss。这是文件,bootstrap_and_overrides.css.scss 像@import bootstrap_and_overrides.css.scss 一样包含在内。
标签: ruby-on-rails twitter-bootstrap bootswatch