:autofillLimited availability
The :autofill pseudo-class matches <input> elements that have been filled in automatically by the browser.
Not yet supported in all major browsers — check the table and provide a fallback.
Browser support
DesktopChrome
1–109Not supported
110+Supportedsince Feb 7, 2023
Current: 155Edge
12–109Not supported
110+Supportedsince Feb 9, 2023
Current: 154Firefox
✕Not supportedup to 157
Current: 157Safari
1–14.1Not supported
15+Supportedsince Sep 20, 2021
Current: 27MobileChrome Android
18–109Not supported
110+Supportedsince Feb 7, 2023
Current: 155Firefox Android
✕Not supportedup to 157
Current: 157Safari iOS
1–14.5Not supported
15+Supportedsince Sep 20, 2021
Current: 27How to use
Not supported in Firefox, Firefox Android. Use feature detection below and provide a fallback (or a polyfill) for those browsers.
Example
Full syntax and examples are on MDN: :autofill.
Feature detection
CSS · check before using
@supports selector(:autofill) {
/* styles that use :autofill */
}
/* or in JavaScript */
if (CSS.supports("selector(:autofill)")) {
// use it
}