WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
309611
@prefers-color-scheme doesn't see color-scheme from grandparent frames and above
https://bugs.webkit.org/show_bug.cgi?id=309611
Summary
@prefers-color-scheme doesn't see color-scheme from grandparent frames and above
Kiet Ho
Reported
2026-03-10 16:35:12 PDT
Created
attachment 478621
[details]
Test case 1 See the test case. We have an <iframe> (iframe 1) with color-scheme: dark. The inside document has another <iframe> (iframe 2) without color-scheme. The innermost document has a box which its background-color depends on @prefers-color-scheme. The color-scheme from iframe 1 should propagate through iframe 2 into the innermost document, so prefers-color-scheme should match "dark". But in WebKit, it doesn't match to "dark". On Chrome 147.0.7719.3 (Official Build) dev (arm64) and Firefox 150.0a1 (2026-03-10) (aarch64), the box is dark blue, regardless of environment color scheme. In WebKit, the box is light blue instead.
Attachments
Test case 1
(488 bytes, text/html)
2026-03-10 16:35 PDT
,
Kiet Ho
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2026-03-10 16:35:19 PDT
<
rdar://problem/172229372
>
Kiet Ho
Comment 2
2026-03-10 16:38:16 PDT
To add, this is found when investigating
bug 284973
.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug