I've been tring to make a custom theme for my site but nothing will effect the background color. This is my theme:
@import '~@angular/material/theming';
@include mat-core();
$warn: mat-palette($mat-red);
$dark-primary: mat-palette($mat-grey, 900);
$dark-accent: mat-palette($mat-grey);
$dark-theme: mat-dark-theme($dark-primary, $dark-accent, $warn);
@include angular-material-theme($dark-theme);
$blue-primary: mat-palette($mat-indigo, 800, 100, 100);
$blue-accent: mat-palette($mat-grey, 300, 100, 500);
$blue-theme: mat-light-theme($blue-primary, $blue-accent, $warn);
.alt-theme {
@include angular-material-theme($blue-theme);
}
I have mat-app-background
on my body but what ever the first included theme is set to dark/light that is what the background color is changed too, black or white.
This was a problem at first but I'm fine with that my issue now is that it doesnt care that the alt-theme is light, the background stays black. Or if the first included theme is light and the alt is dark it will stay white.
EDIT:
So my issue was that I was adding the class to my mat-drawer-container
which I guess it doesnt like, I wrapped it in a div and then everything started working as expected
I usually add variables like these: