angular upgrade: fix warning about theme declaration

This commit is contained in:
bmartins 2023-03-17 23:35:58 +01:00
parent a8ffc53c00
commit a726e3ed34
4 changed files with 31 additions and 7 deletions

View File

@ -6,8 +6,8 @@
// Include the common styles for Angular Material. We include this here so that you only
// have to load a single css file for Angular Material in your app.
// Be sure that you only ever include this mixin once!
@include mat.all-component-typographies();
@include mat.core();
@include mat.all-component-typographies();
// import your custom themes
@import 'theme-light.scss';

View File

@ -9,9 +9,17 @@ $theme-contrast-accent: mat.define-palette(mat.$pink-palette, A200, A100, A400);
$theme-contrast-warn: mat.define-palette(mat.$red-palette);
// Create the theme object (a Sass map containing all of the palettes).
$theme-contrast: mat.define-light-theme($theme-contrast-primary, $theme-contrast-accent, $theme-contrast-warn);
$theme-contrast: mat.define-light-theme(
(
color: (
primary: $theme-contrast-primary,
accent: $theme-contrast-accent,
warn: $theme-contrast-warn,
),
)
);
// Include theme styles for core and each component used in your app.
// Alternatively, you can import and @include the theme mixins for each component
// that you are using.
@include mat.all-component-themes($theme-contrast);
// @include mat.all-component-themes($theme-contrast);

View File

@ -9,9 +9,17 @@ $theme-dark-accent: mat.define-palette(mat.$pink-palette, A200, A100, A400);
$theme-dark-warn: mat.define-palette(mat.$red-palette);
// Create the theme object (a Sass map containing all of the palettes).
$theme-dark: mat.define-dark-theme($theme-dark-primary, $theme-dark-accent, $theme-dark-warn);
$theme-dark: mat.define-dark-theme(
(
color: (
primary: $theme-dark-primary,
accent: $theme-dark-accent,
warn: $theme-dark-warn,
),
)
);
// Include theme styles for core and each component used in your app.
// Alternatively, you can import and @include the theme mixins for each component
// that you are using.
@include mat.all-component-themes($theme-dark);
// @include mat.all-component-themes($theme-dark);

View File

@ -9,9 +9,17 @@ $theme-light-accent: mat.define-palette(mat.$pink-palette, A200, A100, A400);
$theme-light-warn: mat.define-palette(mat.$red-palette);
// Create the theme object (a Sass map containing all of the palettes).
$theme-light: mat.define-light-theme($theme-light-primary, $theme-light-accent, $theme-light-warn);
$theme-light: mat.define-light-theme(
(
color: (
primary: $theme-light-primary,
accent: $theme-light-accent,
warn: $theme-light-warn,
),
)
);
// Include theme styles for core and each component used in your app.
// Alternatively, you can import and @include the theme mixins for each component
// that you are using.
@include mat.all-component-themes($theme-light);
// @include mat.all-component-themes($theme-light);