:autofill
Limited availability97% of users
Matches an input element when its value has been automatically filled by the browser (like an address or credit card). It's useful for overriding the browser's default yellow background in autofilled fields.
What's modern
From web-features, MDN's browser data and our snippets, checked dailyComingNot in Firefox yet, so not every major browser supports it.
See how modern your own CSS is.Check your CSS →
Quick example
input:autofill {
/* Change the default yellow background to a subtle purple shadow */
-webkit-box-shadow: 0 0 0px 1000px #f5f3ff inset;
border: 1px solid #c4b5fd;
}:autofill browser support
BaselineLimited availabilityThis feature is not Baseline because it does not work in some of the most widely-used browsers.Not ready for production without a fallback.
Usage97%of people can use this3% use a browser without it.
Browsers
110+
15+
110+Mobile
110+Android
15+iOS