Skip to content

Commit

Permalink
Bug 1710847 - fix high contrast mode interaction with dark mode dialo…
Browse files Browse the repository at this point in the history
…gs, r=mstriemer,preferences-reviewers

Differential Revision: https://phabricator.services.mozilla.com/D114979
  • Loading branch information
gijsk committed May 12, 2021
1 parent 0fb3f98 commit b770282
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
6 changes: 4 additions & 2 deletions browser/themes/shared/preferences/preferences.inc.css
Original file line number Diff line number Diff line change
Expand Up @@ -588,8 +588,10 @@ checkbox {
}

@media (-moz-toolbar-prefers-color-scheme: dark) {
.dialogBox {
--in-content-page-background: #42414d;
@media not (prefers-contrast) {
.dialogBox {
--in-content-page-background: #42414d;
}
}
}

Expand Down
15 changes: 10 additions & 5 deletions toolkit/themes/shared/in-content/common.inc.css
Original file line number Diff line number Diff line change
Expand Up @@ -189,11 +189,16 @@
scrollbar-color: rgba(249,249,250,.4) rgba(20,20,25,.3);
}

:root[dialogroot],
/* Also need this on dialog :hosts, or the rule above will override the
* value for this custom property again in the shadow DOM. */
:host(dialog) {
--in-content-page-background: #42414d;
/* For dialogs, use a different background colour. We don't do
* this in High Contrast mode, as we should be using system colours then.
*/
@media not (prefers-contrast) {
:root[dialogroot],
/* Also need this on dialog :hosts, or the rule above will override the
* value for this custom property again in the shadow DOM. */
:host(dialog) {
--in-content-page-background: #42414d;
}
}
}

Expand Down

0 comments on commit b770282

Please sign in to comment.