Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Proper theme selection for PDF and light theme #22

Merged
merged 1 commit into from
Jun 21, 2022
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: 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