From faa475cf8c9f16e11c610d98b575886b35323292 Mon Sep 17 00:00:00 2001 From: Julien Calixte Date: Sun, 9 Jul 2023 00:07:10 +0200 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20(tps)=20add=20option=20to=20hide=20?= =?UTF-8?q?text?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.ts | 9 ++++++++- style.css | 4 ++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/main.ts b/main.ts index c399ac1..1c3d738 100644 --- a/main.ts +++ b/main.ts @@ -21,7 +21,7 @@ if (size === "small") { const focusElements = params.getAll("focus") -if (focusElements.length >= 0) { +if (focusElements.length > 0) { const focusables = document.querySelectorAll(".focusable") focusables.forEach((focusable) => { @@ -34,3 +34,10 @@ if (focusElements.length >= 0) { } }) } + +const textHide = params.get("text") + +if (textHide === "hide") { + const focusables = document.querySelectorAll(".focusable") + focusables.forEach((focusable) => focusable.classList.add("text-hide")) +} diff --git a/style.css b/style.css index 1a1eb5b..dc861c8 100644 --- a/style.css +++ b/style.css @@ -46,6 +46,10 @@ li { background-color: var(--background-color-no-focus); } +.text-hide { + color: var(--background-color); +} + .customer-satisfaction-roof { display: flex; flex-direction: column;