From 5704aa2165fa6717514d942b438ae12dd20a2ee9 Mon Sep 17 00:00:00 2001 From: overflowerror Date: Fri, 9 Aug 2024 21:02:00 +0200 Subject: [PATCH] fix: Background not working with linebreak in link closes #2 --- html/styles/main.css | 30 +++--------------------------- 1 file changed, 3 insertions(+), 27 deletions(-) diff --git a/html/styles/main.css b/html/styles/main.css index aea460c..784c5d1 100644 --- a/html/styles/main.css +++ b/html/styles/main.css @@ -103,39 +103,15 @@ h2 { text-decoration: none; color: black; position: relative; - transition: color 0.3s; + background-color: lightgray; + transition: color 0.3s, background-color 0.3s; padding: 4px 6px 2px; } -.text-container a::after { - content: ''; - position: absolute; - top: 0; - right: 0; - left: 0; - bottom: 0; - background-color: black; - z-index: -2; -} - -.text-container a::before { - content: ''; - position: absolute; - top: 0; - right: 0; - width: 100%; - bottom: 0; - background-color: lightgrey; - transition: width 0.3s; - z-index: -1; -} .text-container a:hover { color: white; -} - -.text-container a:hover::before { - width: 0; + background-color: black; } .choice {