Skip to content

Commit

Permalink
fix(material-experimental/mdc-form-field): fill appearance blending i…
Browse files Browse the repository at this point in the history
…n with the background in high contrast mode (#21446)

The outline of the `fill` appearance is done through a background color which will blend
in with the background in high contrast mode. These changes add an outline to replace it.

(cherry picked from commit 3aa5527)
  • Loading branch information
crisbeto authored and annieyw committed Jan 9, 2021
1 parent 22bd693 commit a0adffd
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
@import '@material/notched-outline/variables.import';
@import '@material/textfield/variables.import';
@import 'form-field-sizing';
@import '../../cdk/a11y/a11y';

// Mixin that can be included to override the default MDC text-field
// styles to fit our needs. See individual comments for context on why
Expand Down Expand Up @@ -85,4 +86,12 @@
.mat-mdc-text-field-wrapper::before {
content: none;
}

// The outline of the `fill` appearance is achieved through a background color
// which won't be visible in high contrast mode. Add an outline to replace it.
.mat-form-field-appearance-fill .mat-mdc-text-field-wrapper {
@include cdk-high-contrast(active, off) {
outline: solid 1px;
}
}
}

0 comments on commit a0adffd

Please sign in to comment.