Bas*_*sen 33 less twitter-bootstrap twitter-bootstrap-2
编译Twitter的Bootstrap 2.3.2时.少于2我发现以下错误:
NameError: #grid > .core > .span is undefined in /home/bootstrap-2.3.2/less/navbar.less on line 199, column 3:
198 .navbar-fixed-bottom .container {
199 #grid > .core > .span(@gridColumns);
200 }
Run Code Online (Sandbox Code Playgroud)
我怎样才能解决这个问题?
小智 59
我可以通过创建一个在Bootstrap mixins之后加载的新mixin来避免错误而不修改Bootstrap文件:
#grid {
.core {
.span(@gridColumns) {
width: (@gridColumnWidth * @gridColumns) + (@gridGutterWidth * (@gridColumns - 1));
}
}
};
Run Code Online (Sandbox Code Playgroud)
这对我们来说更好,因为我们避免修补contrib包.
Bas*_*sen 42
在less/navbar.less
文件中:
更换:
.navbar-static-top .container,
.navbar-fixed-top .container,
.navbar-fixed-bottom .container {
#grid > .core > .span(@gridColumns);
}
Run Code Online (Sandbox Code Playgroud)
附:
.navbar-static-top .container,
.navbar-fixed-top .container,
.navbar-fixed-bottom .container {
width: (@gridColumnWidth * @gridColumns) + (@gridGutterWidth * (@gridColumns - 1));
}
Run Code Online (Sandbox Code Playgroud)
另请参阅:使用Less覆盖类定义
归档时间: |
|
查看次数: |
5966 次 |
最近记录: |