From fafa5ca29a0430d58be5b9fbed7883a134c1945c Mon Sep 17 00:00:00 2001 From: J-onasJones Date: Mon, 18 Sep 2023 21:05:28 +0200 Subject: [PATCH] fix: lastfm accessibility --- src/components/NavBar.svelte | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/components/NavBar.svelte b/src/components/NavBar.svelte index d6d7f2a..8c71ede 100644 --- a/src/components/NavBar.svelte +++ b/src/components/NavBar.svelte @@ -26,8 +26,8 @@ * @param {string} str */ function truncateString(str) { - if (str.length > 30) { - return str.slice(0, 30) + "..."; + if (str.length > 29) { + return str.slice(0, 29) + "..."; } else { return str; } @@ -335,6 +335,15 @@ opacity: 0.5; align-self: center; } + .lastfm-text { + display: none; + transition: width 0.3s ease-out; + } + + .lastfm:hover .lastfm-text { + display:block + } + .link { position: absolute; width: 100%;