我正在使用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的问题?
答案 0 :(得分:5)
似乎删除了.png
以及更改
// 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');
解决了这个问题。我认为这是一个库错误