From 2531d0703242f130b15897591612f314ec049baf Mon Sep 17 00:00:00 2001 From: robin Date: Sun, 8 Oct 2023 19:25:01 +0000 Subject: [PATCH] tst --- .../src/lib/components/header/desktop.svelte | 8 +++--- .../src/lib/components/header/mobile.svelte | 27 +++++++++++-------- 2 files changed, 20 insertions(+), 15 deletions(-) diff --git a/frontend/src/lib/components/header/desktop.svelte b/frontend/src/lib/components/header/desktop.svelte index d0be73f..d9ec78e 100644 --- a/frontend/src/lib/components/header/desktop.svelte +++ b/frontend/src/lib/components/header/desktop.svelte @@ -47,13 +47,13 @@ } textElement = document.getElementById("lowerpc") - console.log(textElement, "textel") + containerWidth = container.offsetWidth textWidth = textElement.offsetWidth characterCount = textElement.textContent.length - 1 spaceNeeded = containerWidth - textWidth - console.log(characterCount, spaceNeeded, containerWidth) + if (characterCount > 0 && spaceNeeded > 0) { const letterSpacing = spaceNeeded / characterCount textElement.style.letterSpacing = `${letterSpacing}px` @@ -101,8 +101,8 @@ logo
-

all kids

-

SO GÜNSTIG WIE NACHHALTIG

+
all kids
+
SO GÜNSTIG WIE NACHHALTIG
-

all kids

-

SO GÜNSTIG WIE NACHHALTIG

+
all kids
+
SO GÜNSTIG WIE NACHHALTIG