Skip to content

Instantly share code, notes, and snippets.

@qifei
Last active August 23, 2024 03:50
Show Gist options
  • Save qifei/c427b1c335e3b8fb375bf0ea914f6ad5 to your computer and use it in GitHub Desktop.
Save qifei/c427b1c335e3b8fb375bf0ea914f6ad5 to your computer and use it in GitHub Desktop.
Google Chrome form autofill styles trick
/* Change "white" to any color you want, or transparent. */
input:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 1000px white inset !important;
}

/* transparent background */
input:-webkit-autofill {
    -webkit-transition-delay: 9999s;
    -webkit-transition: color 9999s ease-out, background-color 9999s ease-out;
}

references: https://css-tricks.com/snippets/css/change-autocomplete-styles-webkit-browsers/ https://stackoverflow.com/questions/2920306/google-chrome-form-autofill-and-its-yellow-background

Better solution: USE Firefox

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment