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 13
13
height : 100% ;
14
14
border : none;
15
15
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
+ */
18
21
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;
19
36
}
20
37
21
38
.sampleCategory {
You can’t perform that action at this time.
0 commit comments