---
title: "CSS :autofill"
url: https://daily.dev/posts/css-autofill-w1nb-68nh
source_url: https://davidwalsh.name/css-autofill
type: article
source: "David Walsh"
published: 2022-09-22T01:51:04.826Z
updated: 2022-09-22T01:51:04.766Z
tags: ["css", "html", "ux", "browsers"]
reading_time: 1
upvotes: 42
comments: 4
language: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# CSS :autofill

**[David Walsh](https://daily.dev/sources/dwb)** · 1 min read · 42 upvotes · 4 comments

## Summary

CSS:autofill Autofill is an unnatural act, so signaling to that the value in an input was changed without control is important. To add custom CSS styles to inputs whose contents have been autofilled by the browser, you can use the autofill pseudo-class.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://davidwalsh.name/css-autofill>

## Community discussion

Top comments from developers on daily.dev.

**@kelvinparmar682** · 0 upvotes

> So great

**@lorezz** · 0 upvotes

> Great snippet as always David, minimal but very useful

**@enisizm** · 0 upvotes

> 🙌👍

**@ghost** · 0 upvotes

> Such a small but a welcome change!

## Similar posts on daily.dev

- [Don’t just attend KubeCon \+ CloudNativeCon, Merge Forward your experience\!](https://daily.dev/posts/don-t-just-attend-kubecon-cloudnativecon-merge-forward-your-experience--l0rpp73x8) · CNCF · 0 upvotes · 0 comments
- [Announcing H2 2026 KCDs](https://daily.dev/posts/announcing-h2-2026-kcds-m96goajm1) · CNCF · 1 upvotes · 0 comments
- [Two months of Open Community Groups](https://daily.dev/posts/two-months-of-open-community-groups-asf52zhbs) · CNCF · 0 upvotes · 0 comments

---

Tags: [#css](https://daily.dev/tags/css), [#html](https://daily.dev/tags/html), [#ux](https://daily.dev/tags/ux), [#browsers](https://daily.dev/tags/browsers)

[View this post on daily.dev](https://daily.dev/posts/css-autofill-w1nb-68nh)
