在自定义材质角度主题时,select,dialog和snackbar等组件的背景显得透明,我的sass代码为:
@import '../../node_modules/@angular/material/theming';
@include mat-core();
$default-app-primary: mat-palette($mat-cyan, 700);
$default-app-accent: mat-palette($mat-green, 600, A100, A400);
$default-app-warn: mat-palette($mat-red, 700);
$default-app-theme: mat-light-theme($default-app-primary, $default-app-accent, $default-app-warn);
$no-login-app-theme: mat-dark-theme($default-app-primary, $default-app-accent, $default-app-warn);
$custom-typography: mat-typography-config(
$font-family: 'Montserrat, sans-serif'
);
@include angular-material-typography($custom-typography);
@include angular-material-theme($default-app-theme);
提前致谢