Skip to content

Instantly share code, notes, and snippets.

@greggman
Last active March 12, 2024 23:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save greggman/c0369ecd09587b2d7ea3aa9d65dbb892 to your computer and use it in GitHub Desktop.
Save greggman/c0369ecd09587b2d7ea3aa9d65dbb892 to your computer and use it in GitHub Desktop.
Iframe color-scheme issue
:root { color-scheme: light dark; }
iframe {
color-scheme: light;
background-color: white;
}
<p>The iframe below should be white text on a black background</p>
<iframe src="data:text/html,<!DOCTYPE html><style>:root { color-scheme: light dark; }</style><h1>Some Text in an iframe</h1>"></iframe>
/*bug-in-github-api-content-can-not-be-empty*/
{"name":"Iframe color-scheme issue","settings":{},"filenames":["index.html","index.css","index.js"]}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment