Skip to content

Commit 36f3d69

Browse files
committed
Deploying to gh-pages from @ 8f9e6b6 🚀
1 parent 7d29272 commit 36f3d69

File tree

1 file changed

+19
-2
lines changed

1 file changed

+19
-2
lines changed

‎css/SampleLayout.css

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,26 @@
1313
height: 100%;
1414
border: none;
1515
display: block;
16-
/* should should remain white because samples in iframes expect a white background */
17-
color-scheme: light;
16+
/*
17+
* iframe content inherits the background color of the iframe element
18+
* in the parent but, the content might expect the default white background
19+
* so we set the iframe element's background to white
20+
*/
1821
background-color: #fff;
22+
/*
23+
* further, the browser will ignore the color scheme in the iframe content
24+
* if it matches the one in the parent iframe element. In other words
25+
*
26+
* * iframe element says 'color-scheme: light dark'.
27+
* * iframe content says 'color-scheme: light dark'.
28+
*
29+
* result: iframe content color-scheme setting is ignored and it gets
30+
* the background color from the iframe element in the parent.
31+
*
32+
* Solution: set the iframe element color-scheme to initial. Now the
33+
* iframe content's setting will be respected.
34+
*/
35+
color-scheme: initial;
1936
}
2037

2138
.sampleCategory {

0 commit comments

Comments
 (0)