【发布时间】:2019-08-13 15:39:13
【问题描述】:
我在Angular 8 项目中使用Bulma.io,并且我已经使用以下命令安装了Bulma:npm install bulma。之后,我将样式包含在我的 angular.json 文件中:
"styles": [
"src/styles.css",
"node_modules/bulma/css/bulma.css"
],
"stylePreprocessorOptions": {
"includePaths":
"node_modules",
"node_modules/bulma/sass/utilities"
]
},
我可以使用Bulma,但我不能覆盖变量来更改,例如navbar 的背景颜色。
这是我的scss 文件,它覆盖了navbar 的background-color:
@import 'horizontal-navbar.component.css';
@import 'initial-variables';
@import "functions";
@import "bulma";
$navbar-background-color: #fff;
我做错了什么? 提前致谢。
【问题讨论】:
-
这里有同样的问题。你找到解决办法了吗?
-
它在文档中说要在导入 bulma 之前设置覆盖 - bulma.io/documentation/customize/variables