Skip to content

Commit be167c9

Browse files
tinayuangaokara
authored andcommitted
fix(button-toggle): fix color for selected button toggle and selected disabled button toggle (#3418)
Fixes #3382
1 parent 738e9bf commit be167c9

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

src/lib/button-toggle/_button-toggle-theme.scss

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,16 @@
2323
}
2424

2525
.mat-button-toggle-checked {
26-
background-color: mat-color($mat-grey, 300);
26+
background-color: mat-color($background, selected-button);
2727
color: mat-color($foreground, base);
2828
}
2929

3030
.mat-button-toggle-disabled {
31-
background-color: map_get($mat-grey, 200);
31+
background-color: mat-color($background, disabled-button-toggle);
3232
color: mat-color($foreground, disabled-button);
3333

3434
&.mat-button-toggle-checked {
35-
background-color: mat-color($mat-grey, 400);
35+
background-color: mat-color($background, selected-disabled-button);
3636
}
3737
}
3838
}

src/lib/core/theming/_palette.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -656,6 +656,9 @@ $mat-light-theme-background: (
656656
disabled-button: $black-12-opacity,
657657
raised-button: white,
658658
focused-button: $black-6-opacity,
659+
selected-button: map_get($mat-grey, 300),
660+
selected-disabled-button: map_get($mat-grey, 400),
661+
disabled-button-toggle: map_get($mat-grey, 200),
659662
);
660663

661664
// Background palette for dark themes.
@@ -669,6 +672,9 @@ $mat-dark-theme-background: (
669672
disabled-button: $white-12-opacity,
670673
raised-button: map-get($mat-grey, 800),
671674
focused-button: $white-6-opacity,
675+
selected-button: map_get($mat-grey, 900),
676+
selected-disabled-button: map_get($mat-grey, 800),
677+
disabled-button-toggle: map_get($mat-grey, 1000),
672678
);
673679

674680
// Foreground palette for light themes.

0 commit comments

Comments
 (0)