Skip to content
This repository was archived by the owner on Jan 13, 2025. It is now read-only.

Commit d6a1d4b

Browse files
authored
fix(checkbox): Disabled state colors in IE11 high contrast mode (#5263)
1 parent fe444ac commit d6a1d4b

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

packages/mdc-checkbox/_mixins.scss

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,15 @@ $mdc-checkbox-ripple-target: ".mdc-checkbox__ripple";
7171
@include mdc-checkbox-disabled-ink-color($mdc-checkbox-mark-color, $query: $query);
7272

7373
@media screen and (-ms-high-contrast: active) {
74+
@include mdc-checkbox-disabled-container-colors(
75+
$unmarked-stroke-color: GrayText,
76+
$unmarked-fill-color: transparent,
77+
$marked-stroke-color: GrayText,
78+
$marked-fill-color: transparent,
79+
$query: $query
80+
);
81+
@include mdc-checkbox-disabled-ink-color(GrayText, $query: $query);
82+
7483
.mdc-checkbox__mixedmark {
7584
@include mdc-feature-targets($feat-structure) {
7685
margin: 0 1px; // Extra horizontal space around mixedmark symbol.

packages/mdc-theme/_variables.scss

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,10 @@ $mdc-theme-property-values: (
162162
$style == "currentColor" or
163163
str_slice($style, 1, 4) == "var(" or
164164
$style == "inherit" or
165-
$style == "transparent";
165+
$style == "transparent" or
166+
// NOTE: `GrayText` is deprecated, but is the only feasible way to convey the
167+
// correct high-contrast mode colors in alignment with Windows system colors.
168+
$style == "GrayText";
166169
}
167170

168171
@function mdc-theme-text-emphasis($emphasis) {

0 commit comments

Comments
 (0)