Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save coltenkrauter/34ca748828ffd351930aaf34aaef6c72 to your computer and use it in GitHub Desktop.
Save coltenkrauter/34ca748828ffd351930aaf34aaef6c72 to your computer and use it in GitHub Desktop.
Remove Chrome's autofill background color on HTML inputs. This unique solution makes the background color to transparent rather then a solid color.
// Remove chrome autofill color from inputs
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
transition: background-color 5000000s ease-in-out 0s;
}
# Credit: https://stackoverflow.com/questions/2781549/removing-input-background-colour-for-chrome-autocomplete#answer-29350537
@floatrx
Copy link

floatrx commented Jun 4, 2024

best trick I ever seen 🤪

@TruLie13
Copy link

TruLie13 commented Aug 2, 2024

Thank you!

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