Bug 240925

Summary: System colors do not always respect inherited color-scheme values
Product: WebKit Reporter: Shannon Moeller <me>
Component: CSSAssignee: Aditya Keerthi <akeerthi>
Status: RESOLVED FIXED    
Severity: Normal CC: akeerthi, cdumez, me, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: Safari 15   
Hardware: Mac (Intel)   
OS: macOS 12   

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.