From 89ea6b3bb68ddf769254ceaf8f2fad355cffc093 Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Wed, 26 Apr 2023 22:01:40 +0200 Subject: [PATCH] Update the styling of the findbar `findMsg`-element (issue 16355) This patch tries to mimic the look of the message-element in the Firefox browser-findbar, and thus makes the following changes: - Remove the red colour, since it didn't take the light/dark themes into account. - Display the "notFound" message in bold. --- web/pdf_find_bar.js | 1 + web/viewer.css | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/web/pdf_find_bar.js b/web/pdf_find_bar.js index 3e2c4f0ec..7134fa5e3 100644 --- a/web/pdf_find_bar.js +++ b/web/pdf_find_bar.js @@ -129,6 +129,7 @@ class PDFFindBar { this.findField.setAttribute("aria-invalid", state === FindState.NOT_FOUND); findMsg.then(msg => { + this.findMsg.setAttribute("data-status", status); this.findMsg.textContent = msg; this.#adjustWidth(); }); diff --git a/web/viewer.css b/web/viewer.css index 2c7140f9c..b48b947df 100644 --- a/web/viewer.css +++ b/web/viewer.css @@ -627,8 +627,8 @@ body { margin: 5px; } -#findMsg { - color: rgba(251, 0, 0, 1); +#findMsg[data-status="notFound"] { + font-weight: bold; } :is(#findResultsCount, #findMsg):empty {