I'd like to have a few themes in my app, but along with Angular Material themes I also want to define custom colors that are used by specific components and elements that aren't part of Angular Material. Whenever I change a theme those custom colors should be changed as well. Let's say I have a file that defines colors for each theme, then I'd like to import it in an arbitrary scss file and utilize the colors to style some elements
@import "custom-colors"
.my-elem {
color: $textColor;
}
Then, if I need to change a theme I would apply a specific class to the outer most container of the app, and after this I'd like $textColor to have another value, so that color of the .my-elem would change.
Is there any way of doing this without writing something like
.another-theme {
.my-elem {
color: $textColorOfAnotherTheme;
}
}
In every component that should be affected by theme changing?