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

One way of looking at the problem is that it's about a mis-match between the color-scheme of the parent frame and the iframe: the iframe says it supports a dark background, but the parent page is giving it a light one at the same time as the browser is switching all the other iframe styles over to dark mode.

I see two solutions:

- When there is a _mismatch_ in color scheme between the parent document and the iframe document, the browser should draw an opaque iframe canvas (in the correct background color for the iframe's root color scheme).  The canvas remains transparent if the iframe element's color scheme is the same as the root element for its source document.

- Ignore a `supports-color-scheme: dark` meta setting for the root of the iframe embedded content unless the parent document (or the iframe element in particular) is also in a dark color scheme.

  That doesn't address the reverse issue (the parent document is in dark mode but the embedded iframe doesn't support a dark mode), but hopefully the parent document's authors are more likely to test this situation (and add their own opaque background to the iframe), when they define the dark mode.

-- 
GitHub Notification of comment by AmeliaBR
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/4772#issuecomment-589147118 using your GitHub account

Received on Thursday, 20 February 2020 15:47:18 UTC