所以,我正在使用 angularCLI 和 angular-MDC,我想使用我的styles.scss
. 网站上有https://trimox.github.io/angular-mdc-web/#/angular-mdc-web/top-app-bar-demo/sassmdc-top-app-bar-fill-color($color)
我使用并返回了这个语法No mixin named mdc-top-app-bar-fill-color
,下面是我的代码:
组件.html
<mdc-top-app-bar class="header-mdc" [mdcElevation]="5">
<div style="text-align: center">
<h1>Autonomous</h1>
</div>
</mdc-top-app-bar>
组件.scss
.header-mdc {
@include mdc-top-app-bar-fill-color($mdc-theme-secondary);
}
样式.scss
$mdc-theme-primary: #6200ee; // primary color
$mdc-theme-secondary: #FFFFFF; // secondary color
@import '~@angular-mdc/theme/material';
body {
font-family: 'Roboto Thin';
margin: 0;
padding-top: 0.1px;
}
错误
@include mdc-top-app-bar-fill-color($mdc-theme-secondary);
^
No mixin named mdc-top-app-bar-fill-color