File tree Expand file tree Collapse file tree 1 file changed +19
-2
lines changed
Expand file tree Collapse file tree 1 file changed +19
-2
lines changed Original file line number Diff line number Diff line change 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 {
You can’t perform that action at this time.
0 commit comments