Skip to content

Commit

Permalink
fix(form-field): unable to distinguish disabled form field in high co…
Browse files Browse the repository at this point in the history
…ntrast mode (#12445)

Fixes the disabled form field being indistinguishable from enabled ones in high contrast mode, due to the dotted gradient not being rendered.
  • Loading branch information
crisbeto authored and jelbourn committed Aug 1, 2018
1 parent db8f83d commit df2b371
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/lib/form-field/form-field-legacy.scss
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,11 @@ $mat-form-field-legacy-underline-height: 1px !default;
&.mat-form-field-disabled .mat-form-field-underline {
background-position: 0;
background-color: transparent;

@include cdk-high-contrast {
border-top-style: dotted;
border-top-width: 2px;
}
}

&.mat-form-field-invalid:not(.mat-focused) .mat-form-field-ripple {
Expand Down
5 changes: 5 additions & 0 deletions src/lib/form-field/form-field-standard.scss
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ $mat-form-field-standard-padding-top: 0.75em !default;
&.mat-form-field-disabled .mat-form-field-underline {
background-position: 0;
background-color: transparent;

@include cdk-high-contrast {
border-top-style: dotted;
border-top-width: 2px;
}
}

// Note that we need this specific of a selector because we don't want
Expand Down

0 comments on commit df2b371

Please sign in to comment.