Merge pull request #21329 from calixteman/fix_selection_color

Force the text selection color to be in light mode
This commit is contained in:
Tim van der Meij 2026-05-25 13:59:13 +02:00 committed by GitHub
commit 87b436ddd4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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;