Posted By

cerxx on 03/20/19


Tagged

chrome CSS-Tricks


Versions (?)

Change Autocomplete Styles in WebKit Browsers


 / Published in: CSS
 

URL: https://css-tricks.com/snippets/css/change-autocomplete-styles-webkit-browsers/

We got a nice tip from Lydia Dugger via email with a method for changing the styles that WebKit browsers apply to form fields that have been autocompleted.

  1. /* Change Autocomplete styles in Chrome*/
  2. input:-webkit-autofill,
  3. input:-webkit-autofill:hover,
  4. input:-webkit-autofill:focus
  5. textarea:-webkit-autofill,
  6. textarea:-webkit-autofill:hover
  7. textarea:-webkit-autofill:focus,
  8. select:-webkit-autofill,
  9. select:-webkit-autofill:hover,
  10. select:-webkit-autofill:focus {
  11. border: 1px solid green;
  12. -webkit-text-fill-color: green;
  13. -webkit-box-shadow: 0 0 0px 1000px #000 inset;
  14. transition: background-color 5000s ease-in-out 0s;
  15. }

Report this snippet  

You need to login to post a comment.