upgrade to angular 18, migrate material
This commit is contained in:
+9
-18
@@ -10,22 +10,6 @@
|
||||
|
||||
@import './variables.scss';
|
||||
|
||||
// Define the palettes for your theme using the Material Design palettes available in palette.scss
|
||||
// (imported above). For each palette, you can optionally specify a default, lighter, and darker
|
||||
// hue. Available color palettes: https://material.io/design/color/
|
||||
$light-theme: mat.define-light-theme((color: (primary: $light-primary,
|
||||
accent: $light-accent,
|
||||
warn: $light-warn,
|
||||
)));
|
||||
|
||||
// Define an alternate dark theme.
|
||||
$dark-theme: mat.define-dark-theme((color: (primary: $dark-primary,
|
||||
accent: $light-accent,
|
||||
warn: $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.
|
||||
@@ -35,8 +19,6 @@ $dark-theme: mat.define-dark-theme((color: (primary: $dark-primary,
|
||||
@include mat.all-component-colors($dark-theme);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* You can add global styles to this file, and also import other style files */
|
||||
|
||||
/* fallback */
|
||||
@@ -293,6 +275,15 @@ mat-card.accent mat-card-header {
|
||||
background-color: $accent !important;
|
||||
}
|
||||
|
||||
.mat-mdc-list-item-unscoped-content {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
mat-icon {
|
||||
margin-right: 0.2em;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
table {
|
||||
border: 0;
|
||||
|
||||
+26
-12
@@ -1,19 +1,33 @@
|
||||
@use '@angular/material' as mat;
|
||||
|
||||
$light-primary: mat.define-palette(mat.$gray-palette, 800);
|
||||
$light-accent: mat.define-palette(mat.$pink-palette, A200, A100, A400);
|
||||
$light-warn: mat.define-palette(mat.$red-palette);
|
||||
$light-primary: mat.m2-define-palette(mat.$m2-gray-palette, 800);
|
||||
$light-accent: mat.m2-define-palette(mat.$m2-pink-palette, A200, A100, A400);
|
||||
$light-warn: mat.m2-define-palette(mat.$m2-red-palette);
|
||||
|
||||
$primary: mat.get-color-from-palette($light-primary);
|
||||
$accent: mat.get-color-from-palette($light-accent);
|
||||
$warn: mat.get-color-from-palette($light-warn);
|
||||
$dark-primary: mat.m2-define-palette(mat.$m2-grey-palette, 900, 500, 700);
|
||||
$dark-accent: mat.m2-define-palette(mat.$m2-amber-palette, A200, A100, A400);
|
||||
$dark-warn: mat.m2-define-palette(mat.$m2-deep-orange-palette);
|
||||
|
||||
$dark-primary: mat.define-palette(mat.$grey-palette, 900, 500, 700);
|
||||
$dark-accent: mat.define-palette(mat.$amber-palette, A200, A100, A400);
|
||||
$dark-warn: mat.define-palette(mat.$deep-orange-palette);
|
||||
// Define the palettes for your theme using the Material Design palettes available in palette.scss
|
||||
// (imported above). For each palette, you can optionally specify a default, lighter, and darker
|
||||
// hue. Available color palettes: https://material.io/design/color/
|
||||
$light-theme: mat.m2-define-light-theme((color: (primary: $light-primary,
|
||||
accent: $light-accent,
|
||||
warn: $light-warn,
|
||||
)));
|
||||
|
||||
// Define an alternate dark theme.
|
||||
$dark-theme: mat.m2-define-dark-theme((color: (primary: $dark-primary,
|
||||
accent: $light-accent,
|
||||
warn: $light-warn,
|
||||
)));
|
||||
|
||||
$primary: mat.get-theme-color($light-theme, primary, default);
|
||||
$accent: mat.get-theme-color($light-theme, accent, default);
|
||||
$warn: mat.get-theme-color($light-theme, warn, default);
|
||||
|
||||
.dark-theme {
|
||||
$primary: mat.get-color-from-palette($dark-primary);
|
||||
$accent: mat.get-color-from-palette($light-accent);
|
||||
$warn: mat.get-color-from-palette($light-warn);
|
||||
$primary: mat.get-theme-color($dark-theme, primary, default);
|
||||
$accent: mat.get-theme-color($dark-theme, accent, default);
|
||||
$warn: mat.get-theme-color($dark-theme, warn, default);
|
||||
}
|
||||
Reference in New Issue
Block a user