朋友们,我正在尝试为 Angular Material 定制一个主题。我似乎在按照官方指南做所有事情。
@import "~@angular/material/theming";
$md-editor: (
50: #e4f6ff,
100: #bce9ff,
200: #8fdbff,
300: #62ccff,
400: #41c1ff,
500: #1fb6ff,
600: #1bafff,
700: #17a6ff,
800: #129eff,
900: #0a8eff,
A100: #ffffff,
A200: #f5faff,
A400: #c2e0ff,
A700: #a8d4ff,
contrast: (
50: #000000,
100: #000000,
200: #000000,
300: #000000,
400: #000000,
500: #000000,
600: #000000,
700: #000000,
800: #ffffff,
900: #ffffff,
A100: #000000,
A200: #000000,
A400: #000000,
A700: #000000,
),
);
$template-editor-primary: mat-palette($md-editor);
$template-editor-accent: mat-palette($md-editor, A200, A100, A400);
$template-editor-warn: mat-palette($md-editor);
$template-editor-theme: mat-light-theme($template-editor-primary, $template-editor-accent, $template-editor-warn);
@include angular-material-theme($template-editor-theme);
@include mat-core();
我创建了这个 theme.scss 文件,将其添加到 angular.json,但我观察到以下情况 - 有些东西将我的颜色重新定义为 mat-deep-purple。
为什么会这样,我不明白,根据代码,该主题没有其他定义。有没有人有任何选择或想法?谢谢