【问题标题】:Override less variables in twitter-bootstrap-rails在 twitter-bootstrap-rails 中覆盖较少的变量
【发布时间】:2012-06-09 07:26:09
【问题描述】:

我正在使用 twitter-bootstrap-rails gem,在 bootstrap_and_overrides.css.less 文件中我有下一行:

// 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; 时,我收到以下错误:

Invalid CSS after "...icons-halflings": expected ")", was ".png"");"

是我做错了什么,还是 lib 的问题?

【问题讨论】:

    标签: ruby-on-rails twitter-bootstrap twitter-bootstrap-rails


    【解决方案1】:

    似乎删除.pngs 等会发生变化

    // Set the correct sprite paths
    @iconSpritePath: asset-path('twitter/bootstrap/glyphicons-halflings.png');
    @iconWhiteSpritePath: asset-path('twitter/bootstrap/glyphicons-halflings-white.png');
    

    进入

    // Set the correct sprite paths
    @iconSpritePath: asset-path('twitter/bootstrap/glyphicons-halflings');
    @iconWhiteSpritePath: asset-path('twitter/bootstrap/glyphicons-halflings-white');
    

    解决了这个问题。我认为这是一个库错误

    【讨论】:

    • 感谢您的解决方案!我有同样的问题,你的修复工作。我在 Github 上提出了修改建议:github.com/seyhunak/twitter-bootstrap-rails/pull/429
    • 谢谢!我有一个 rails app 我正在为使用这个 gem 的人整理一个示例 rails 应用程序来查看。它部署在heroku。希望得到一些帮助,将一些页面放在一起运行测试。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2013-12-24
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-12-26
    • 1970-01-01
    • 2019-01-25
    相关资源
    最近更新 更多