Bug 250896
| Summary: | Default styles for input:autofill disregards color-scheme | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Johannes Odland <johannes.odland> |
| Component: | CSS | Assignee: | Nobody <webkit-unassigned> |
| Status: | NEW | ||
| Severity: | Normal | CC: | ahmad.saleem792, bdakin, karlcow, timothy, webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | Safari Technology Preview | ||
| Hardware: | Mac (Apple Silicon) | ||
| OS: | macOS 13 | ||
Johannes Odland
UA stylesheet for input:autofill does not respect color-scheme: dark.
The stylesheet sets the background-color to a bright yellow, and color to black, regardless of whether color-scheme is dark, as in the stylesheet below.
This is suboptimal for users visiting dark websites, and authors building sites with support for dark mode.
```css
input:autofill, input:-webkit-autofill-strong-password,
input:-webkit-autofill-strong-password-viewable,
input:-webkit-autofill-and-obscured {
background-color: rgb(250, 255, 189);background-image: none;color: rgb(0, 0, 0);
}
Chrome on the other switches to a transparent color when in dark-mode, something that works better with the dark color scheme.
```css
input:-internal-autofill-selected {
appearance: menulist-button;
background-image: none !important;
background-color: -internal-light-dark(rgb(232, 240, 254), rgba(70, 90, 126, 0.4)) !important;
color: fieldtext !important;
}
```
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/104743445>