Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 19 additions & 2 deletions public/css/SampleLayout.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,26 @@
height: 100%;
border: none;
display: block;
/* should should remain white because samples in iframes expect a white background */
color-scheme: light;
/*
* iframe content inherits the background color of the iframe element
* in the parent but, the content might expect the default white background
* so we set the iframe element's background to white
*/
background-color: #fff;
/*
* further, the browser will ignore the color scheme in the iframe content
* if it matches the one in the parent iframe element. In other words
*
* * iframe element says 'color-scheme: light dark'.
* * iframe content says 'color-scheme: light dark'.
*
* result: iframe content color-scheme setting is ignored and it gets
* the background color from the iframe element in the parent.
*
* Solution: set the iframe element color-scheme to initial. Now the
* iframe content's setting will be respected.
*/
color-scheme: initial;
}

.sampleCategory {
Expand Down