RESOLVED FIXED311766
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
Radar WebKit Bug Importer
Comment 1 2026-04-08 15:44:40 PDT
Carlos Alberto Lopez Perez
Comment 2 2026-04-08 16:06:48 PDT
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.