feat(all theming): Clean and reusable way to override all components theme colors #30244
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
Currently, there is a way to generate a custom color palette using the generation tool. However, all components appear too dark regardless of the target color, and there is no single-line solution to specify a base color tone for all components since
--mat-sys-primary
is hardcoded to the tone value40
by the theme mixin.Unfortunately, with Material v19, picking colors from the theme no longer works. You can still specify a material theme using
$app-theme: mat.define-theme(...)
with some restrictions, but applying it using the new mixin@include mat.theme($app-theme)
doesn't work.So please provide clean and simple solution to:
1. Specify and reuse a theme object
For example:
2. Specify a base color tone for all components at once
For example:
or as an alternative output all theme-palette tones as css variables, so we can easily reuse them to customize theme and component colors:
3. Specify a base color for a specific component (single-line override)
For example:
The text was updated successfully, but these errors were encountered: