Skip to content

Commit 1f1dac5

Browse files
authored
fix(material-experimental/theming): Add support for color variants in badge, button-toggle, button, pseudo-checkbox, and chips (#28457)
1 parent 81cb5ac commit 1f1dac5

File tree

8 files changed

+643
-131
lines changed

8 files changed

+643
-131
lines changed

src/dev-app/theme-m3.scss

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
@mixin color-variant-styles($theme, $color-variant) {
66
@include mat.option-color($theme, $color-variant: $color-variant);
77
@include mat.progress-spinner-color($theme, $color-variant: $color-variant);
8+
@include mat.pseudo-checkbox-color($theme, $color-variant: $color-variant);
89

910
&.mat-icon {
1011
@include mat.icon-color($theme, $color-variant: $color-variant);
@@ -47,6 +48,14 @@
4748
@include mat.datepicker-color($theme, $color-variant: $color-variant);
4849
}
4950

51+
&.mat-mdc-button-base {
52+
@include mat.button-color($theme, $color-variant: $color-variant);
53+
}
54+
55+
&.mat-mdc-standard-chip {
56+
@include mat.chips-color($theme, $color-variant: $color-variant);
57+
}
58+
5059
.mdc-list-item__start,
5160
.mdc-list-item__end {
5261
@include mat.checkbox-color($theme, $color-variant: $color-variant);
@@ -68,14 +77,23 @@
6877
.mat-primary {
6978
@include color-variant-styles($theme, primary);
7079
}
80+
.mat-badge {
81+
@include mat.badge-color($theme, $color-variant: primary);
82+
}
7183

7284
.mat-accent {
7385
@include color-variant-styles($theme, secondary);
7486
}
87+
.mat-badge-accent {
88+
@include mat.badge-color($theme, $color-variant: secondary);
89+
}
7590

7691
.mat-warn {
7792
@include color-variant-styles($theme, error);
7893
}
94+
.mat-badge-warn {
95+
@include mat.badge-color($theme, $color-variant: error);
96+
}
7997
}
8098

8199
// Add an indicator to make it clear that the app is styled with the experimental M3 theme.

0 commit comments

Comments
 (0)