Skip to content

Commit 9c86b5f

Browse files
crisbetojelbourn
authored andcommitted
fix(checkbox): poor color contrast for disabled checkbox (#14044)
Fixes some poor color contrast on the text of a disabled checkbox. The issue comes from the fact that it was using a custom color rather than the one from theme.
1 parent f212345 commit 9c86b5f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/lib/checkbox/_checkbox-theme.scss

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
$accent: map-get($theme, accent);
1010
$warn: map-get($theme, warn);
1111
$background: map-get($theme, background);
12+
$foreground: map-get($theme, foreground);
1213

1314

1415
// The color of the checkbox's checkmark / mixedmark.
@@ -22,7 +23,7 @@
2223
$disabled-color: if($is-dark-theme, $white-30pct-opacity-on-dark, $black-26pct-opacity-on-light);
2324

2425
.mat-checkbox-frame {
25-
border-color: mat-color(map-get($theme, foreground), secondary-text);
26+
border-color: mat-color($foreground, secondary-text);
2627
}
2728

2829
.mat-checkbox-checkmark {
@@ -73,7 +74,7 @@
7374
}
7475

7576
.mat-checkbox-label {
76-
color: $disabled-color;
77+
color: mat-color($foreground, secondary-text);
7778
}
7879

7980
@include cdk-high-contrast {

0 commit comments

Comments
 (0)