Skip to content

Commit

Permalink
fix(checkbox): poor color contrast for disabled checkbox (#14044)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
crisbeto authored and jelbourn committed Dec 3, 2018
1 parent f212345 commit 9c86b5f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/lib/checkbox/_checkbox-theme.scss
Expand Up @@ -9,6 +9,7 @@
$accent: map-get($theme, accent);
$warn: map-get($theme, warn);
$background: map-get($theme, background);
$foreground: map-get($theme, foreground);


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

.mat-checkbox-frame {
border-color: mat-color(map-get($theme, foreground), secondary-text);
border-color: mat-color($foreground, secondary-text);
}

.mat-checkbox-checkmark {
Expand Down Expand Up @@ -73,7 +74,7 @@
}

.mat-checkbox-label {
color: $disabled-color;
color: mat-color($foreground, secondary-text);
}

@include cdk-high-contrast {
Expand Down

0 comments on commit 9c86b5f

Please sign in to comment.