Bug 240925 - System colors do not always respect inherited color-scheme values
Summary: System colors do not always respect inherited color-scheme values
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: Safari 15
Hardware: Mac (Intel) macOS 12
: P2 Normal
Assignee: Aditya Keerthi
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-05-25 14:36 PDT by Shannon Moeller
Modified: 2022-08-02 10:14 PDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Shannon Moeller 2022-05-25 14:36:52 PDT
Unfocused form fields (at least input and select) don't respect the current `color-scheme` property value when selecting the default background color; it instead uses the system-defined value. For example, if the system is in dark mode and a form field exists in a container that has set `color-scheme: light;`, the form field incorrectly has a dark background in addition to dark text. The correct background color is used when the field receives focus, but reverts to the incorrect value when blurred again.

https://twitter.com/shannonmoeller/status/1528801195963256833
https://codepen.io/shannonmoeller/full/dyJOedj
Comment 1 Radar WebKit Bug Importer 2022-06-01 14:37:12 PDT
<rdar://problem/94247591>
Comment 2 Aditya Keerthi 2022-07-25 10:59:37 PDT
Pull request: https://github.com/WebKit/WebKit/pull/2706
Comment 3 EWS 2022-08-02 10:14:06 PDT
Committed 253041@main (ae8a3909d325): <https://commits.webkit.org/253041@main>

Reviewed commits have been landed. Closing PR #2706 and removing active labels.