Skip to content

Commit

Permalink
Merge pull request #22 from PROxZIMA/fix-theme-bug
Browse files Browse the repository at this point in the history
Fix: Proper theme selection for PDF and light theme
  • Loading branch information
PROxZIMA authored Jun 21, 2022
2 parents c0f059a + 0a72874 commit 6cb9635
Showing 1 changed file with 17 additions and 4 deletions.
21 changes: 17 additions & 4 deletions userContent.css
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
}

/* Theme for browser webpages */
@media (-moz-toolbar-prefers-color-scheme: dark) {
@media (-moz-toolbar-prefers-color-scheme: dark), (prefers-color-scheme: dark) {
:root {
--back-color1: var(--dark-color1);
--back-color2: var(--dark-color2);
Expand Down Expand Up @@ -79,6 +79,19 @@
--text-color3: var(--dark-color7);
}

/* Theme for browser webpages */
@media (-moz-toolbar-prefers-color-scheme: light), (prefers-color-scheme: light) {
:root {
--back-color1: var(--light-color1);
--back-color2: var(--light-color2);
--back-color3: var(--light-color3);
--back-color4: var(--light-color4);

--text-color1: var(--dark-color5);
--text-color2: var(--dark-color6);
--text-color3: var(--dark-color7);
}
}



Expand Down Expand Up @@ -330,9 +343,9 @@ url-prefix(view-source:) {
--field-bg-color: var(--back-color1) !important;
}

@media (-moz-toolbar-prefers-color-scheme: dark) {
.canvasWrapper > canvas {
filter: invert(1) !important;
@media (-moz-toolbar-prefers-color-scheme: dark), (prefers-color-scheme: dark) {
#viewer {
filter: invert(1);
}
}

Expand Down

0 comments on commit 6cb9635

Please sign in to comment.