Angular 角度材质2自定义主题更改主体背景色

Angular 角度材质2自定义主题更改主体背景色,angular,sass,angular-material2,custom-theme,Angular,Sass,Angular Material2,Custom Theme,我已经在Angular Material 2中创建了自定义主题,现在我想使用自定义主题更改默认的身体背景色。我认为可以通过在theming.scss文件中使用此映射对象来更改/覆盖它: $mat-light-theme-background: ( status-bar: map_get($mat-grey, 300), app-bar: map_get($mat-grey, 100), background: map_get($mat-grey, 50), //To overr

我已经在Angular Material 2中创建了自定义主题,现在我想使用自定义主题更改默认的身体背景色。我认为可以通过在
theming.scss
文件中使用此映射对象来更改/覆盖它:

$mat-light-theme-background: (
  status-bar: map_get($mat-grey, 300),
  app-bar:    map_get($mat-grey, 100),
  background: map_get($mat-grey, 50), //To override this property
  hover:      rgba(black, 0.04), // TODO(kara): check style with Material Design UX
  card:       white,
  dialog:     white,
  disabled-button: $black-12-opacity,
  raised-button: white,
  focused-button: $black-6-opacity,
  selected-button: map_get($mat-grey, 300),
  selected-disabled-button: map_get($mat-grey, 400),
  disabled-button-toggle: map_get($mat-grey, 200),
  unselected-chip: map_get($mat-grey, 300),
  disabled-list-option: map_get($mat-grey, 200),
);
但是如何从自定义主题更改此
background
属性?以下是我的自定义主题文件中的内容:

@import '~@angular/material/theming';

$typography: mat-typography-config( $font-family: 'Roboto, sans-serif', $body-1: mat-typography-level(13px, 18px, 400) );

@include mat-core($typography);

$primary: mat-palette($mat-indigo);
$accent: mat-palette($mat-pink, A200, A100, A400);
$warn: mat-palette($mat-red);

$theme: mat-light-theme($primary, $accent, $warn);

@include angular-material-theme($theme);
可能重复的