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

Commit

Permalink
fix(checkbox): Fix visibility in Windows high-contrast mode (#2672)
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickrodee authored May 31, 2018
1 parent a02397a commit eadec3c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
6 changes: 4 additions & 2 deletions packages/mdc-checkbox/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
}

.mdc-checkbox__mixedmark {
@include mdc-theme-prop(background-color, $color);
@include mdc-theme-prop(border-color, $color);
}
}

Expand Down Expand Up @@ -365,9 +365,11 @@

@mixin mdc-checkbox__mixedmark_ {
width: 100%;
height: floor($mdc-checkbox-mark-stroke-size);
height: 0;
transform: scaleX(0) rotate(0deg);
transition: mdc-checkbox-transition-exit(opacity), mdc-checkbox-transition-exit(transform);
border-width: floor($mdc-checkbox-mark-stroke-size) / 2;
border-style: solid;
opacity: 0;
}

Expand Down
2 changes: 1 addition & 1 deletion packages/mdc-radio/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
@mixin mdc-radio-ink-color($color) {
// stylelint-disable-next-line selector-max-specificity
.mdc-radio__native-control:enabled + .mdc-radio__background .mdc-radio__inner-circle {
@include mdc-theme-prop(background-color, $color);
@include mdc-theme-prop(border-color, $color);
}
}

Expand Down
12 changes: 7 additions & 5 deletions packages/mdc-radio/mdc-radio.scss
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
cursor: pointer;

/* @alternate */
will-change: opacity, transform, border-color, background-color, color;
will-change: opacity, transform, border-color, color;

// Container for radio circles and ripple.
&__background {
Expand Down Expand Up @@ -88,7 +88,9 @@
width: 100%;
height: 100%;
transform: scale(0, 0);
transition: mdc-radio-exit(transform), mdc-radio-exit(background-color);
transition: mdc-radio-exit(transform), mdc-radio-exit(border-color);
border-width: 10px;
border-style: solid;
border-radius: 50%;
}

Expand Down Expand Up @@ -124,7 +126,7 @@
}

.mdc-radio__inner-circle {
transition: mdc-radio-enter(transform), mdc-radio-enter(background-color);
transition: mdc-radio-enter(transform), mdc-radio-enter(border-color);
}
}
}
Expand All @@ -138,7 +140,7 @@
+ .mdc-radio__background {
.mdc-radio__inner-circle {
transform: scale(.5);
transition: mdc-radio-enter(transform), mdc-radio-enter(background-color);
transition: mdc-radio-enter(transform), mdc-radio-enter(border-color);
}
}
}
Expand All @@ -153,7 +155,7 @@
}

.mdc-radio__inner-circle {
background-color: $mdc-radio-circle-color;
border-color: $mdc-radio-circle-color;
}
}
}
Expand Down

0 comments on commit eadec3c

Please sign in to comment.