我在我的angular 8项目中使用Bootstrap 4.3.1。基本上我想(更改/覆盖)bootstrap的一些默认变量。例如$ font-size-base
我已经尝试过下面的代码,但是这根本无法正常工作,请向我建议在角度项目中(自定义/更改/覆盖)bootstrap scss变量的正确方法。
angular.json
"styles": [
"node_modules/bootstrap/dist/css/bootstrap.min.css","src/scss/style.scss"
],
style.scss
@import "../../node_modules/bootstrap/scss/_functions";
@import "../../node_modules/bootstrap/scss/_variables";
@import "../../node_modules/bootstrap/scss/mixins";
$font-size-base: 0.655rem;
package.json
"@ng-bootstrap/ng-bootstrap": "^5.1.2","bootstrap": "^4.3.1",
在运行角度项目时仍显示默认字体大小。