Created
August 29, 2024 01:10
-
-
Save devstar0209/4ba5266a8b2d9248741beb6c9a445ba7 to your computer and use it in GitHub Desktop.
Prevent autocomplete and ignore background color in autofill
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
autocomplete="nope" | |
autocomplete="new-password" | |
input:-webkit-autofill, | |
textarea:-webkit-autofill, | |
select:-webkit-autofill { | |
appearance: menulist-button; | |
background-color: rgb(232, 240, 254) !important; /* Light theme background color */ | |
-webkit-text-fill-color: #ffffff !important; | |
-webkit-caret-color: white !important; | |
caret-color: white !important; | |
background-image: none !important; /* Remove any background image */ | |
transition: background-color 5000s ease-in-out 0s; /* Prevent flicker on autofill */ | |
} | |
input:-webkit-autofill:active { | |
-webkit-caret-color: white !important; | |
caret-color: white !important; | |
} | |
input:-internal-autofill-selected { | |
appearance: menulist-button; | |
background-color: rgba(70, 90, 126, 0.4) !important; /* Dark theme background color */ | |
-webkit-text-fill-color: #ffffff !important; | |
-webkit-caret-color: white !important; | |
caret-color: white !important; | |
background-image: none !important; /* Remove any background image */ | |
transition: background-color 5000s ease-in-out 0s; /* Prevent flicker on autofill */ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment