【发布时间】:2018-07-15 23:12:58
【问题描述】:
我正在尝试修改具有 Angular 6 且使用 Angular Material 6.3.3 的项目的主题
目前,我只是从 Material 站点复制代码并按照步骤操作,但是当我尝试运行 ng serve 时弹出错误。
**ERROR** in ./src/styles.css (./node_modules/raw-loader!./node_modules/postcss-loader/lib??embedded!./src/styles.css)
Module build failed: Syntax Error
(118:13) Missed semicolon
116 | // We use display: flex on this element exclusively for centering connected overlays.
117 | // When not centering, a top/left/bottom/right will be set which overrides the normal
118 | // flex layout.
| ^
119 | display: flex;
120 |
ℹ 「wdm」: Failed to compile.
我的 theme.scss 文件如下所示:
@import '~@angular/material/_theming.scss';
@include mat-core();
$candy-app-primary: mat-palette($mat-indigo);
$candy-app-accent: mat-palette($mat-blue, A200, A100, A400);
$candy-app-warn: mat-palette($mat-red);
$candy-app-theme: mat-light-theme($candy-app-primary, $candy-app-accent, $candy-app-warn);
@include angular-material-theme($candy-app-theme);
【问题讨论】:
-
发布出错的文件:./src/styles.css。
标签: angular angular-material angular-material2 angular-material-theming