Skip to content

Commit 635ee67

Browse files
crisbetoandrewseguin
authored andcommitted
fix(material/form-field): input placeholder not hidden in high contrast mode
Fixes that the placeholder was showing up behind the label in high contrast mode.
1 parent 6c1383a commit 635ee67

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/material/form-field/form-field-input.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,12 @@
128128
// Remove the transition to prevent the placeholder
129129
// from overlapping when the label comes back down.
130130
transition: none;
131+
132+
@include a11y.high-contrast(active, off) {
133+
// In high contrast mode the browser will render the
134+
// placeholder despite the `color: transparent` above.
135+
opacity: 0;
136+
}
131137
}
132138
}
133139
}

0 commit comments

Comments
 (0)