WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
311766
REGRESSION (
310465@main
): prefers-color-scheme in an iframe ignores system preference when the main page does not set a explicit color-scheme.
https://bugs.webkit.org/show_bug.cgi?id=311766
Summary
REGRESSION (310465@main): prefers-color-scheme in an iframe ignores system pr...
Carlos Alberto Lopez Perez
Reported
2026-04-08 15:31:18 PDT
310465@main
changed prefersColorSchemeFeatureSchema so that subframes derive their prefers-color-scheme value from the CSS color-scheme property of their parent element. However, it accidentally broke the case where the main page has no explicit color-scheme set. This happens because
310465@main
looks at the color-scheme property of the iframe and if finds nothing then looks at the one on the parent page page, but when that parent page has no explicit color-scheme, then the iframe tag has nothing to inherit, defaulting to to light instead to the defined system preference.
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2026-04-08 15:44:40 PDT
<
rdar://problem/174359110
>
Carlos Alberto Lopez Perez
Comment 2
2026-04-08 16:06:48 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/62312
EWS
Comment 3
2026-04-09 16:19:59 PDT
Committed
310874@main
(f89a7480911d): <
https://commits.webkit.org/310874@main
> Reviewed commits have been landed. Closing PR #62312 and removing active labels.
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