feat(all): Mixins for changing component color #30241
Labels
feature
This issue represents a new feature or feature request rather than a bug or bug fix
needs triage
This issue needs to be triaged by the team
Feature Description
What I want
To easily change the color of a material component.
Context
It is a very common use case to change a material component default color, and migrating from v18 to v19 this was a pain point for me.
Before in v18, I could change the component color to one in my theme palette like this:
And now in v19, I need to specify every tokens:
It's much more complicated now, and if we want to keep the same level of contrast (here tones 10 and 90) we have to inspect the generated code and find the equivalent in the new color.
Proposed solution
In v18 we had to pick a color from our theme, which wasn't very flexible. An ideal solution would be:
If not doable, then the same behavior as v18 would be good enough:
There should be one
mat.<component>-color
mixin for each material component.Use Case
No response
The text was updated successfully, but these errors were encountered: