我一直在研究 google material design for web 并且对SASS
. 就目前而言,我一直在尝试使用框架中提供mdc-top-app-bar
的 sass mixin更改背景颜色。fill-color($color)
尝试了这几行
@use '@material/button/mdc-button';
@use '@material/button';
@use "@material/top-app-bar/mdc-top-app-bar";
@use "@material/icon-button/mdc-icon-button";
.mdc-top-app-bar {
@include mdc-top-app-bar.fill-color(#8e44ad);
}
显示以下错误消息
ERROR in ./app.scss
Module build failed (from ./node_modules/sass-loader/dist/cjs.js):
SassError: Undefined mixin.
╷
10 │ @include mdc-top-app-bar.fill-color(#8e44ad);
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^