Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix iframe color-scheme CSS #158

Merged
merged 1 commit into from
Jul 28, 2021
Merged

Conversation

slorber
Copy link
Collaborator

@slorber slorber commented Jul 28, 2021

Report fix of @lex111 in Infima: facebook/docusaurus#5223

The behavior of color-scheme for iframes look a bit weird. Without "auto" it seems to apply the value of the parent at the moment the iframe loads (leading to potentially a bad iframe background), and then does not update on parent color-scheme changes. Auto seems to "track" better the color-scheme changes of the parent.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jul 28, 2021
@github-actions
Copy link

Dist CSS Diff

diff --git a/packages/core/dist/css/default/default.css b/packages/core/dist-branch/css/default/default.css
index 291daa5..03db51e 100644
--- a/packages/core/dist/css/default/default.css
+++ b/packages/core/dist-branch/css/default/default.css
@@ -397,6 +397,10 @@ body {
   word-wrap: break-word;
 }
 
+iframe {
+  color-scheme: auto;
+}
+
 /* Layout */
 
 /**

@github-actions
Copy link

Size Change: +236 B (0%)

Total Size: 580 kB

Filename Size Change
./packages/core/dist/css/default-dark/default-dark-rtl.css 84.2 kB +34 B (0%)
./packages/core/dist/css/default-dark/default-dark-rtl.min.css 59.1 kB +25 B (0%)
./packages/core/dist/css/default-dark/default-dark.css 84.2 kB +34 B (0%)
./packages/core/dist/css/default-dark/default-dark.min.css 59 kB +25 B (0%)
./packages/core/dist/css/default/default-rtl.css 82.6 kB +34 B (0%)
./packages/core/dist/css/default/default-rtl.min.css 57.9 kB +25 B (0%)
./packages/core/dist/css/default/default.css 82.6 kB +34 B (0%)
./packages/core/dist/css/default/default.min.css 57.9 kB +25 B (0%)
ℹ️ View Unchanged
Filename Size
./packages/core/dist/js/alerts.js 409 B
./packages/core/dist/js/alerts.min.js 409 B
./packages/core/dist/js/button-groups.js 267 B
./packages/core/dist/js/button-groups.min.js 267 B
./packages/core/dist/js/dropdowns.js 1.01 kB
./packages/core/dist/js/dropdowns.min.js 1.01 kB
./packages/core/dist/js/menu.js 1.94 kB
./packages/core/dist/js/menu.min.js 1.94 kB
./packages/core/dist/js/navbar.js 1.08 kB
./packages/core/dist/js/navbar.min.js 1.08 kB
./packages/core/dist/js/pills.js 270 B
./packages/core/dist/js/pills.min.js 270 B
./packages/core/dist/js/radio-behavior.js 705 B
./packages/core/dist/js/radio-behavior.min.js 705 B
./packages/core/dist/js/tabs.js 267 B
./packages/core/dist/js/tabs.min.js 267 B

compressed-size-action

@netlify
Copy link

netlify bot commented Jul 28, 2021

✔️ Deploy Preview for infima ready!

🔨 Explore the source changes: e26bb87

🔍 Inspect the deploy log: https://app.netlify.com/sites/infima/deploys/610170463535db0007ff7d92

😎 Browse the preview: https://deploy-preview-158--infima.netlify.app/demo

@slorber slorber merged commit 9eb8334 into master Jul 28, 2021
@lex111 lex111 deleted the slorber/fix-color-scheme-iframe branch July 29, 2021 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants