W3C home > Mailing lists > Public > public-css-archive@w3.org > February 2020

[csswg-drafts] [css-color-adjust-1] `color-scheme` should affect embedded iframes (#4772)

From: Thomas Steiner via GitHub <sysbot+gh@w3.org>
Date: Thu, 13 Feb 2020 08:06:09 +0000
To: public-css-archive@w3.org
Message-ID: <issues.opened-564507871-1581581167-sysbot+gh@w3.org>
tomayac has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-color-adjust-1] `color-scheme` should affect embedded iframes ==
When a site contains iframes that specify their `color-scheme` either via the [meta tag](https://drafts.csswg.org/css-color-adjust-1/#color-scheme-meta) or the [CSS property](https://drafts.csswg.org/css-color-adjust-1/#color-scheme-prop), the default text color changes, however, the background color is transparent, see this [demo](https://color-scheme-meta-css.glitch.me/) and note how the screenshot (Chrome Canary 82 left, Safari Tech Preview 100 right) shows the disappearing heading (white on white):

![Screen Shot 2020-02-12 at 10 15 16](https://user-images.githubusercontent.com/145676/74412619-22fa7680-4e3e-11ea-88d6-38fceb4f375f.png)

(Chrome doesn't implement form element darkening yet.)

If, however, one loads one of the embedded iframes in isolation ([demo](https://color-scheme-meta-css.glitch.me/dark-meta.html)), things work as expected and the background is dark (again Chrome left, Safari right):

![Screen Shot 2020-02-13 at 08 56 20](https://user-images.githubusercontent.com/145676/74412941-bd5aba00-4e3e-11ea-9ce6-419e77238ab5.png)

As discussed with @chrishtr in an offline thread, `color-scheme` should arguably also affect embedded iframes and render them as if they were the root document.

Spec links:

- https://drafts.csswg.org/css-color-adjust-1/#color-scheme-prop
- https://drafts.csswg.org/css-color-adjust-1/#color-scheme-meta

CC: @lilles

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/4772 using your GitHub account
Received on Thursday, 13 February 2020 08:06:20 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:42:00 UTC