Bug 243757 - color-scheme should not propagate to viewport background if set on <body>
Summary: color-scheme should not propagate to viewport background if set on <body>
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Tim Nguyen (:ntim)
URL:
Keywords: BrowserCompat, InRadar
Depends on:
Blocks:
 
Reported: 2022-08-09 17:31 PDT by Aditya Keerthi
Modified: 2022-08-18 11:04 PDT (History)
3 users (show)

See Also:


Attachments
reduction (2.02 KB, text/html)
2022-08-09 17:31 PDT, Aditya Keerthi
no flags Details
comparison (265.14 KB, image/png)
2022-08-09 17:32 PDT, Aditya Keerthi
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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.