Bug 243757

Summary: color-scheme should not propagate to viewport background if set on <body>
Product: WebKit Reporter: Aditya Keerthi <akeerthi>
Component: CSSAssignee: Tim Nguyen (:ntim) <ntim>
Status: RESOLVED FIXED    
Severity: Normal CC: karlcow, ntim, webkit-bug-importer
Priority: P2 Keywords: BrowserCompat, InRadar
Version: Other   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
reduction
none
comparison none

Description Aditya Keerthi 2022-08-09 17:31:22 PDT
The following test case renders differently on every browser. We should investigate why and understand the right behavior.
Comment 1 Aditya Keerthi 2022-08-09 17:31:53 PDT
Created attachment 461512 [details]
reduction
Comment 2 Aditya Keerthi 2022-08-09 17:32:22 PDT
Created attachment 461513 [details]
comparison
Comment 3 Tim Nguyen (:ntim) 2022-08-14 12:00:33 PDT
Firefox & Chrome's behavior are correct here, `color-scheme: light dark` is set on `<body>`. The page background is provided the viewport, so the <html> tag. If you set `color-scheme: light dark` on `<html>`, then the behavior is the same across browsers.
Comment 4 Tim Nguyen (:ntim) 2022-08-14 12:04:18 PDT
As for the scrollbar, I believe Firefox simply doesn't adjust the scrollbar based on color-scheme (but does adjust based on the `scrollbar-color` property which Chrome & WebKit don't support).
Comment 5 Tim Nguyen (:ntim) 2022-08-14 12:06:00 PDT
I think the only actionable item here is the viewport background & <body> interaction.
Comment 6 Radar WebKit Bug Importer 2022-08-16 17:32:16 PDT
<rdar://problem/98756494>
Comment 7 Tim Nguyen (:ntim) 2022-08-17 23:51:48 PDT
Pull request: https://github.com/WebKit/WebKit/pull/3440
Comment 8 EWS 2022-08-18 11:04:30 PDT
Committed 253565@main (cbdcbdd4e8f1): <https://commits.webkit.org/253565@main>

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