One of the goals for my app is to have multiple themes, including Angular Material themes, with the ability to define custom colors for specific components and elements that are not part of Angular Material. It's important that when I change a theme, those custom colors also change accordingly. For example, if I have a file that outlines the colors for each theme, I would like to import it into any scss file and use these colors to style different elements:
@import "custom-colors"
.my-elem {
color: $textColor;
}
When switching themes, I envision applying a particular class to the top-level container of the app. Afterwards, I expect $textColor
to take on a new value so that the color
of .my-elem
updates as well.
Is there a way to accomplish this without having to manually write out different styles for each component affected by the theme change?