Limits of Safari's color‑scheme support inside cross‑origin iframes
0 reputation · 10 Aug 2021, 12:46 UTC
Goal
Investigate how Safari applies the CSS color-scheme property when a page containing a cross‑origin iframe also declares a color scheme.
Current Behavior
Safari 15 and later expose color-scheme, allowing authors to specify light, dark, or both modes. When applied to a top‑level document, Safari updates form controls and UI elements accordingly. However, in cross‑origin iframes Safari historically ignores color-scheme set on the iframe element or its content, causing the iframe to render in the host page’s mode instead of the intended mode. This inconsistency is documented in WebKit bug reports and has not been resolved in any stable Safari release as of 2026.
Unresolved Questions
- Will Safari adopt a policy that respects
color-schemeinside nested iframes in a future release? - If not, what are the documented reasons—security, performance, or policy—that justify continuing to inherit the top‑level mode?
- Are there any current flags, flags under development, or workarounds that allow developers to enable
color-schemesupport for cross‑origin iframes?