我想通过在Bootstrap的CSS中添加Font Awesome来替换Bootstrap默认的Glyphicons。如何定制由LESS生成的CSS以包含Font Awesome,而不会在更新核心Bootstrap文件时出现问题?注意:Font Awesome建议更改核心Bootstrap“bootstrap.less”文件,将
@import "sprites.less";
替换为@import "path/to/font-awesome/less/font-awesome.less";
,但是这种更改将被覆盖,如果替换了Bootstrap核心(例如版本升级)。与我之前的问题(“如何使用LESSCSS变量自定义Twitter Bootstrap的CSS?”)类似,我们可以假设我拥有这个文件结构:/html
/bootstrap
...etc...
/js
/less
/Font-Awesome
/css
/font
/less
...etc...
/MyApp
...etc...
/common_files
/less
style.less