diff --git a/lib/core/custom-theme/material-theme.scss b/lib/core/custom-theme/material-theme.scss index 11d85c74d2..73b0b8b997 100644 --- a/lib/core/custom-theme/material-theme.scss +++ b/lib/core/custom-theme/material-theme.scss @@ -1,7 +1,8 @@ @use 'sass:map'; +@use '@angular/material' as mat; @import './theme/theme-data'; -$custom-theme: mat-light-theme( +$custom-theme: mat.define-light-theme( ( color: ( primary: map.get($palettes, primary), diff --git a/lib/core/custom-theme/theme/custom-palette-creator.scss b/lib/core/custom-theme/theme/custom-palette-creator.scss index b86bfe8f78..ed815e3870 100644 --- a/lib/core/custom-theme/theme/custom-palette-creator.scss +++ b/lib/core/custom-theme/theme/custom-palette-creator.scss @@ -1,6 +1,7 @@ @use 'sass:map'; @use 'sass:math'; @use 'sass:color'; +@use '@angular/material' as mat; @function multiply($fore, $back) { $red: math.div(color.red($back) * color.red($fore), 255); @@ -44,8 +45,11 @@ $green: color.green($color); $blue: color.blue($color); - $light-text: $light-primary-text; - $dark-text: $dark-primary-text; + $light-text: map.get(mat.$light-theme-foreground-palette, text); + $light-secondary-text: map.get(mat.$light-theme-foreground-palette, secondary-text); + + $dark-text: map.get(mat.$dark-theme-foreground-palette, text); + $dark-secondary-text: map.get(mat.$dark-theme-foreground-palette, secondary-text); @if $colorType == 'accent' { $light-text: $light-secondary-text; diff --git a/lib/core/custom-theme/theme/theme-data.scss b/lib/core/custom-theme/theme/theme-data.scss index 66afaa6f5b..f6b79f69ee 100644 --- a/lib/core/custom-theme/theme/theme-data.scss +++ b/lib/core/custom-theme/theme/theme-data.scss @@ -1,5 +1,4 @@ @use 'sass:map'; -@import '@angular/material/theming'; @import './theme-configuration'; @import './typography'; @import './custom-theme-palettes'; @@ -14,9 +13,6 @@ $text-color: map.get($theme-config, 'textColor'); $base-font-size: map.get($theme-config, 'baseFontSize'); $font-family: map.get($theme-config, 'fontFamily'); -$app-typography: get-mat-typography( - $base-font-size, - $font-family -); +$app-typography: get-mat-typography($base-font-size, $font-family); $palettes: get-mat-palettes($primary-color, $accent-color);