In Google Chrome on MacOS (Version 75.0.3770.142) when I hover over an autofill suggestion the font size in the input becomes very small (also the font family changes) but after choosing the suggestion it goes back to the normal size.
What might be causing this behaviour?
There is a solution:
input:-webkit-autofill::first-line {font-size: 16px}
Here is working solution that worked for me in 2021 for Chrome not to change font size on autocomplete suggest hover:
input#email { font-size: 2rem; color: blue; } input:-webkit-autofill::first-line { color: red; font-size: 2rem; }
<input id="email"></input>
Also I noticed that for some reason display: flex
conflicts with that code, take a look:
input#email { font-size: 2rem; color: blue; display: flex; } input:-webkit-autofill::first-line { color: red; font-size: 2rem; }
<input id="email"></input>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With