标签: bootply

Bootstrap Customization:我为什么要使用LESS?

我正在考虑将LESS集成到我的Bootstrap编辑器(Bootply.com)中,以符合Bootstrap自定义最佳实践,并支持mixins.

但是,我还没有确定使用LESS而不是简单CSS覆盖的特定优势(性能和其他方面).似乎最终LESS被编译为CSS.看起来LESS将引入更多的维护/重新编译任务,因为引入了新版本的Bootstrap.

我知道可以在'bootstrap.css'之后使用自定义'theme.css'来完成Bootstrap自定义.所以,如果你想改变.navbar颜色,我只需要在'theme.css'中加几行就像..

.navbar-custom .navbar-inner {
   background-color:#444444;
}
Run Code Online (Sandbox Code Playgroud)

然后标记看起来像:

<div class="navbar navbar-custom navbar-fixed-top">..
Run Code Online (Sandbox Code Playgroud)

如果这不是定制的最佳实践,那么LESS如何改进呢?

css less twitter-bootstrap bootply

7
推荐指数
1
解决办法
2453
查看次数

标签 统计

bootply ×1

css ×1

less ×1

twitter-bootstrap ×1