Anyone knows how to remove this ugly chrome background when autofill? (Refer below.)
So far I tried:
*:focus {
outline: 0;
}
input:-webkit-autofill {
-webkit-box-shadow: none;
-webkit-text-fill-color: #fff !important;
}
button:focus, input:focus, a:focus {
text-decoration: none !important;
outline: none !important;
}
Sadly, none of them works. Any help, ideas, clues, suggestions would be greatly appreciated.
Best Answer
Oddly enough this is the intended behaviour from webkit to let the user infer it was autofilled.
You can use:
Which will change the background to white.
You can also turn auto complete off by adding:
E.g
To your input, but for usability I would suggest against this.