Skip to content

Commit e305e78

Browse files
authored
Merge pull request #127 from vpetrusevici/master
restore $default-foreground and $default-background vars
2 parents d8d742d + 833c633 commit e305e78

File tree

2 files changed

+322
-205
lines changed

2 files changed

+322
-205
lines changed

projects/material-css-vars/src/lib/_main.scss

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,12 @@
77
// needs to come after '~@angular/material/theming'
88
@use 'mat-lib-overwrites' as overwrites;
99

10-
@mixin init-css-vars($default-theme, $text) {
10+
@mixin init-css-vars($default-theme, $text, $default-foreground, $default-background) {
1111
// init css variables
1212
@include helper.root($text);
1313
@include helper.root($default-theme);
14+
@include helper.root($default-foreground);
15+
@include helper.root($default-background);
1416
}
1517

1618
@mixin init-mat-theme($dark-theme-selector, $typography-config: mat.define-typography-config(), $load-mdc-components, $load-legacy-components) {
@@ -86,10 +88,12 @@
8688
$dark-theme-selector: variables.$dark-theme-selector,
8789
$default-theme-text: variables.$text,
8890
$typography-config: mat.define-typography-config(),
91+
$default-foreground: variables.$default-foreground,
92+
$default-background: variables.$default-background,
8993
$load-mdc-components: true,
9094
$load-legacy-components: false,
9195
) {
92-
@include init-css-vars($default-theme, $default-theme-text);
96+
@include init-css-vars($default-theme, $default-theme-text, $default-foreground, $default-background);
9397
@include init-mat-theme($dark-theme-selector, $typography-config, $load-mdc-components, $load-legacy-components) using ($mat-css-theme) {
9498
@content($mat-css-theme);
9599
}

0 commit comments

Comments
 (0)