使用twitter引导与轨道资产管道和更少
问题描述:
如何正确集成twitter-bootstrap-rails宝石与资产管道?使用twitter引导与轨道资产管道和更少
我已经按照安装步骤,目前,我有这个application.css
*= require_self
*= require bootstrap_and_overrides
然后在bootstrap_and_overrides.css.less我导入其他控制器样式表,以使他们的工作与我的变量定义在覆盖文件中,并且能够使用<controller-name>.css.less
文件中的控制器特定样式表中的引导混合。以这种方式然而
# in bootstrap_and_overrides.css.less
// generated code ...
// Your custom LESS stylesheets goes here
//
// Since bootstrap was imported above you have access to its mixins which
// you may use and inherit here
//
// If you'd like to override bootstrap's own variables, you can do so here as well
// See http://twitter.github.com/bootstrap/less.html for their names and documentation
//
// Example:
// @linkColor: #ff0000;
@linkColor: #ff0000;
// import all other stylesheets
@import 'home.css.less';
@import 'users.css.less';
// and so on, once for every controller
// in home.css.less
#foobar {
.border-radius(30px); // bootstrap mixin
color: @linkColor; // inherited variable
}
我失去了资产管道,我看不到单独的样式表了在开发模式:目前我在做这个。有什么办法可以使twitter-bootstrap-rails与链轮一起工作吗?
答
认为github上的this问题解释了你的问题。 (我知道这是对青菜,但解释应该是无论如何有效)
总之,采用链轮将单独编译每个文件,这意味着你不能使用由Twitter的引导框架中定义的变量和混入。所以我想答案是否定的:)