NEW316680
iframes don't respect the color-scheme CSS property of the parent document.
https://bugs.webkit.org/show_bug.cgi?id=316680
Summary iframes don't respect the color-scheme CSS property of the parent document.
Oliver Williams
Reported 2026-06-09 10:45:07 PDT
If test.html contains either <meta name="color-scheme" content="dark light" /> or the following CSS :root { color-scheme: light dark; } then the following should render differently. <iframe style="color-scheme: light;" src="test.html" frameborder="0"></iframe> <iframe style="color-scheme: dark;" src="test.html" frameborder="0"></iframe> This already works properly in Firefox and Chrome/Edge. color-scheme should effect: - prefers-color-scheme media query (this works in Safari Technology Preview already! ✅) - Canvas, CanvasText, and other system color keywords. ❌ - Any uses of the CSS light-dark() function. ❌ - scrollbars ❌
Attachments
Test code for the iframe (701 bytes, text/html)
2026-06-09 11:51 PDT, Oliver Williams
no flags
Oliver Williams
Comment 1 2026-06-09 11:51:34 PDT
Created attachment 480028 [details] Test code for the iframe
Radar WebKit Bug Importer
Comment 2 2026-06-09 18:21:11 PDT
Kiet Ho
Comment 3 2026-06-09 18:27:04 PDT
Note You need to log in before you can comment on or make changes to this bug.