Skip to content

Commit

Permalink
fix(material/form-field): input placeholder not hidden in high contra…
Browse files Browse the repository at this point in the history
…st mode

Fixes that the placeholder was showing up behind the label in high contrast mode.
  • Loading branch information
crisbeto authored and andrewseguin committed Apr 22, 2021
1 parent 6c1383a commit 635ee67
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/material/form-field/form-field-input.scss
Expand Up @@ -128,6 +128,12 @@
// Remove the transition to prevent the placeholder
// from overlapping when the label comes back down.
transition: none;

@include a11y.high-contrast(active, off) {
// In high contrast mode the browser will render the
// placeholder despite the `color: transparent` above.
opacity: 0;
}
}
}
}
Expand Down

0 comments on commit 635ee67

Please sign in to comment.