-
Notifications
You must be signed in to change notification settings - Fork 10.2k
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
Conversation
There was a problem hiding this 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
let mediaMatcher = "prefers-color-scheme"; | ||
if (typeof PDFJSDev !== "undefined" && PDFJSDev.test("MOZCENTRAL")) { | ||
mediaMatcher = "-moz-toolbar-prefers-color-scheme"; | ||
} |
There was a problem hiding this comment.
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";
ed39883
to
2c713f9
Compare
…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.
…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.
…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.
See: https://bugzilla.mozilla.org/show_bug.cgi?id=1701691