How to hide Microsoft Edge's password reveal button
- Published at
- Updated at
- Reading time
- 1min
I read the new web
course on Forms today and learned a surprising fact about forms in Microsoft Edge.
Did you know that Edge provides a "password reveal" button in password fields? That's right; password fields include a little clickable "eye icon" to show and hide the entered password.
However, a great usability feature only available in one browser isn't great. ๐คทโโ๏ธ If you want to provide password reveal functionality to all browsers, you still have to implement it yourself. And that means you have to get rid of Edge's little gimmick.
To hide Edge's additional password functionality, use this cryptic pseudo-element. ๐
::-ms-reveal {
display: none
}
If you're using Edge, play with the pseudo-element below.
HTML
CSS
And if you want to learn more about this functionaliy, check the Microsoft Edge Reference docs.
Join 5.5k readers and learn something new every week with Web Weekly.