Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Chrome Autofill CSS

I successfully changed Chrome’s input Autofill styling to transparent (however) this only works as you type into the input field.

If you select one of the autofill options to populate the field then the input color becomes an opaque white and you can’t see behind it. I cant the CSS that is doing this either. 🧐

Here is a codePen if you want to take a look.
https://codepen.io/jinch/pen/wvmrGGJ?editors=1100

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

Is there any way to keep this field transparent (at all times)? Any suggestions appreciated.

Cheers.

input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus, 
input:-webkit-autofill:active {
    background-color: transparent !important;
    -webkit-box-shadow: 0 0 0 50px white inset;
    transition: background-color 5000s ease-in-out 0s !important;
}

input {
    background-color: #eee !important;
}

>Solution :

input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus, 
input:-webkit-autofill:active {
   transition: background-color 5000s ease-in-out 0s !important;
}

Just this code should be work.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading