-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Propagate preferred color-scheme to non-top frames.
The ColorSchemeMode::Preferred change doesn't make a difference (that is, always use the preferred one), since when we only propagate from top's embedder the embedder is chrome, which always has the preferred color-scheme. Differential Revision: https://phabricator.services.mozilla.com/D154931 bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1782596 gecko-commit: 495ffb27c683fe2219b559708d3eb415847faa10 gecko-reviewers: jwatt
- Loading branch information
Showing
3 changed files
with
32 additions
and
0 deletions.
There are no files selected for viewing
10 changes: 10 additions & 0 deletions
10
css/css-color-adjust/rendering/dark-color-scheme/color-scheme-iframe-preferred-ref.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<!doctype html> | ||
<title>CSS Test Reference</title> | ||
<style> | ||
div { | ||
width: 100px; | ||
height: 100px; | ||
} | ||
</style> | ||
<div style="background-color: purple"></div> | ||
<div style="background-color: blue"></div> |
15 changes: 15 additions & 0 deletions
15
css/css-color-adjust/rendering/dark-color-scheme/color-scheme-iframe-preferred.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<!doctype html> | ||
<title>prefers-color-scheme propagation</title> | ||
<link rel="help" href="https://drafts.csswg.org/css-color-adjust/#color-scheme-effect"> | ||
<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/4772"> | ||
<link rel="match" href="color-scheme-iframe-preferred-ref.html"> | ||
<style> | ||
iframe { | ||
display: block; | ||
border: none; | ||
width: 100px; | ||
height: 100px; | ||
} | ||
</style> | ||
<iframe style="color-scheme: dark" src="support/prefers-color-scheme-blue-purple.html"></iframe> | ||
<iframe style="color-scheme: light" src="support/prefers-color-scheme-blue-purple.html"></iframe> |
7 changes: 7 additions & 0 deletions
7
...ss-color-adjust/rendering/dark-color-scheme/support/prefers-color-scheme-blue-purple.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<!doctype html> | ||
<style> | ||
:root { background-color: blue } | ||
@media (prefers-color-scheme: dark) { | ||
:root { background-color: purple } | ||
} | ||
</style> |