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

For mozcentral use Firefox color theme instead of system theme. #13314

Merged
merged 1 commit into from Apr 29, 2021

Conversation

brendandahl
Copy link
Contributor

Copy link
Collaborator

@Snuffleupagus Snuffleupagus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks reasonable enough to me, with one small nit; thank you!

web/app.js Outdated
Comment on lines 427 to 430
let mediaMatcher = "prefers-color-scheme";
if (typeof PDFJSDev !== "undefined" && PDFJSDev.test("MOZCENTRAL")) {
mediaMatcher = "-moz-toolbar-prefers-color-scheme";
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: I'd suggest just setting the value directly, rather than first defining it and then immediately overwriting it here:

const mediaMatcher =
  typeof PDFJSDev !== "undefined" && PDFJSDev.test("MOZCENTRAL")
    ? "-moz-toolbar-prefers-color-scheme"
    : "prefers-color-scheme";

@brendandahl brendandahl merged commit 2067bcc into mozilla:master Apr 29, 2021
Snuffleupagus added a commit that referenced this pull request Oct 17, 2021
…e." since -moz-toolbar-prefers-color-scheme was removed

Reverts #13314, see https://groups.google.com/g/firefox-dev/c/vajhbYKDpPM

Given that `-moz-toolbar-prefers-color-scheme` was removed in https://bugzilla.mozilla.org/show_bug.cgi?id=1736038, unless we fix this before the next PDF.js update in mozilla-central we'll thus break dark mode in the Firefox built-in PDF Viewer.
bh213 pushed a commit to bh213/pdf.js that referenced this pull request Jun 3, 2022
…e." since -moz-toolbar-prefers-color-scheme was removed

Reverts mozilla#13314, see https://groups.google.com/g/firefox-dev/c/vajhbYKDpPM

Given that `-moz-toolbar-prefers-color-scheme` was removed in https://bugzilla.mozilla.org/show_bug.cgi?id=1736038, unless we fix this before the next PDF.js update in mozilla-central we'll thus break dark mode in the Firefox built-in PDF Viewer.
rousek pushed a commit to signosoft/pdf.js that referenced this pull request Aug 10, 2022
…e." since -moz-toolbar-prefers-color-scheme was removed

Reverts mozilla#13314, see https://groups.google.com/g/firefox-dev/c/vajhbYKDpPM

Given that `-moz-toolbar-prefers-color-scheme` was removed in https://bugzilla.mozilla.org/show_bug.cgi?id=1736038, unless we fix this before the next PDF.js update in mozilla-central we'll thus break dark mode in the Firefox built-in PDF Viewer.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants