从 bootstrap css 中删除 bootstrap 个字形
remove bootstrap glyphicons from bootstrap css
我想从 Bootstraop css 中删除 Bootstrap 图标包,因为它太重而且我使用的字体很棒。有什么办法可以去掉。
我正在使用 web pack 将 scss 个文件编译成 css。
我使用的是最新版本的 bootstrap。我已经安装了 bootstrap-sass
和 @import "~bootstrap-sass/assets/stylesheets/bootstrap";
以导入 bootstrap.
如果您需要任何进一步的信息,请发表评论。
而不是导入 bootstrap-sass/assets/stylesheets/bootstrap
只需创建一个自定义文件,在其中导入没有像这样的 glyphicon 的 evrything
bootstrap-sass/assets/stylesheets/bootstrap
的内容是这样的,我在glyphicon导入的那一行做了一些修改
// Core variables and mixins
@import "bootstrap/variables";
@import "bootstrap/mixins";
// Reset and dependencies
@import "bootstrap/normalize";
@import "bootstrap/print";
// Here is where the glyphicons are import
// I comment just this line and every thing will work like you want without the glyphicons
//@import "bootstrap/glyphicons";
// Core CSS
@import "bootstrap/scaffolding";
@import "bootstrap/type";
@import "bootstrap/code";
@import "bootstrap/grid";
@import "bootstrap/tables";
@import "bootstrap/forms";
@import "bootstrap/buttons";
// Components
@import "bootstrap/component-animations";
@import "bootstrap/dropdowns";
@import "bootstrap/button-groups";
@import "bootstrap/input-groups";
@import "bootstrap/navs";
@import "bootstrap/navbar";
@import "bootstrap/breadcrumbs";
@import "bootstrap/pagination";
@import "bootstrap/pager";
@import "bootstrap/labels";
@import "bootstrap/badges";
@import "bootstrap/jumbotron";
@import "bootstrap/thumbnails";
@import "bootstrap/alerts";
@import "bootstrap/progress-bars";
@import "bootstrap/media";
@import "bootstrap/list-group";
@import "bootstrap/panels";
@import "bootstrap/responsive-embed";
@import "bootstrap/wells";
@import "bootstrap/close";
// Components w/ JavaScript
@import "bootstrap/modals";
@import "bootstrap/tooltip";
@import "bootstrap/popovers";
@import "bootstrap/carousel";
// Utility classes
@import "bootstrap/utilities";
@import "bootstrap/responsive-utilities";
```
我想从 Bootstraop css 中删除 Bootstrap 图标包,因为它太重而且我使用的字体很棒。有什么办法可以去掉。
我正在使用 web pack 将 scss 个文件编译成 css。
我使用的是最新版本的 bootstrap。我已经安装了 bootstrap-sass
和 @import "~bootstrap-sass/assets/stylesheets/bootstrap";
以导入 bootstrap.
如果您需要任何进一步的信息,请发表评论。
而不是导入 bootstrap-sass/assets/stylesheets/bootstrap
只需创建一个自定义文件,在其中导入没有像这样的 glyphicon 的 evrything
bootstrap-sass/assets/stylesheets/bootstrap
的内容是这样的,我在glyphicon导入的那一行做了一些修改
// Core variables and mixins
@import "bootstrap/variables";
@import "bootstrap/mixins";
// Reset and dependencies
@import "bootstrap/normalize";
@import "bootstrap/print";
// Here is where the glyphicons are import
// I comment just this line and every thing will work like you want without the glyphicons
//@import "bootstrap/glyphicons";
// Core CSS
@import "bootstrap/scaffolding";
@import "bootstrap/type";
@import "bootstrap/code";
@import "bootstrap/grid";
@import "bootstrap/tables";
@import "bootstrap/forms";
@import "bootstrap/buttons";
// Components
@import "bootstrap/component-animations";
@import "bootstrap/dropdowns";
@import "bootstrap/button-groups";
@import "bootstrap/input-groups";
@import "bootstrap/navs";
@import "bootstrap/navbar";
@import "bootstrap/breadcrumbs";
@import "bootstrap/pagination";
@import "bootstrap/pager";
@import "bootstrap/labels";
@import "bootstrap/badges";
@import "bootstrap/jumbotron";
@import "bootstrap/thumbnails";
@import "bootstrap/alerts";
@import "bootstrap/progress-bars";
@import "bootstrap/media";
@import "bootstrap/list-group";
@import "bootstrap/panels";
@import "bootstrap/responsive-embed";
@import "bootstrap/wells";
@import "bootstrap/close";
// Components w/ JavaScript
@import "bootstrap/modals";
@import "bootstrap/tooltip";
@import "bootstrap/popovers";
@import "bootstrap/carousel";
// Utility classes
@import "bootstrap/utilities";
@import "bootstrap/responsive-utilities";
```