input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
-webkit-box-shadow: 0 0 0 30px white inset !important;
}
Solution 1 :
Problem :
It seems that the current way to change the background-color of an input that is autofilled (username is my example bellow) by the browser is by using a transition
:
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
transition: background-color 5000s ease-in-out 0s;
-webkit-text-fill-color: #fff !important;
}
#input-container input{
display: block;
background-color: transparent;
}
This is working but is there any cleaner way to do it whiteout having to create a transition?
Comments
Comment posted by Jacob Lockard
transition
Comment posted by stackoverflow.com/questions/2781549/…
This is not what I am saying. transition has to be on the code for most of the solutions. Reference:
Comment posted by Jacob Lockard
I see, that makes more sense.
Comment posted by Gert Arnold
Please don’t post code-only answers. Future readers will be grateful to see explained
Comment posted by edit
As it’s currently written, your answer is unclear. Please