From 6b69cf7a3ec5c26a4ac3873eb9c194c32c999640 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=93scar=20Fern=C3=A1ndez?= Date: Sat, 2 Dec 2023 19:54:04 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix:=20prevent=20background=20ov?= =?UTF-8?q?erflow=20on=20link=20hover=20(#226)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sass/parts/_misc.scss | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/sass/parts/_misc.scss b/sass/parts/_misc.scss index 850d40f..9add72f 100644 --- a/sass/parts/_misc.scss +++ b/sass/parts/_misc.scss @@ -78,22 +78,19 @@ a:hover { color: var(--hover-color); } -a:not(.no-hover-padding)::before { +a:not(.no-hover-padding):hover::after { + display: inline-block; position: absolute; top: 0; right: -0.15em; bottom: 0; left: -0.15em; - opacity: 0; z-index: -1; background-color: var(--primary-color); + max-width: 105%; // This fixes multi-line links (see #225) content: ""; } -a:not(.no-hover-padding):hover::before { - opacity: 1; -} - @media screen and (max-width: 600px) { .list > ul { margin: 0;