mirror of
https://github.com/mozilla/pdf.js.git
synced 2026-05-31 07:11:00 +02:00
Force the text selection color to be in light mode
Most of the pdfs have a white background, so it makes sense to use the colors for light mode.
This commit is contained in:
parent
5f2691e77d
commit
f7af3ea9ac
@ -132,6 +132,9 @@ class DOMFilterFactory extends BaseFilterFactory {
|
||||
if (!this.#_defs) {
|
||||
const div = this.#document.createElement("div");
|
||||
const { style } = div;
|
||||
// The pdf colors are mostly in light mode (white background with a black
|
||||
// foreground), so the filters are created in light mode.
|
||||
style.colorScheme = "only light";
|
||||
style.visibility = "hidden";
|
||||
style.contain = "strict";
|
||||
style.width = style.height = 0;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user