From 345d70f7e44dee91fe6493a37efd8cc2f28cb222 Mon Sep 17 00:00:00 2001 From: Giteabot Date: Fri, 20 Oct 2023 23:44:46 +0800 Subject: [PATCH] Fix sticky diff header background (#27697) (#27712) Backport #27697 by @silverwind Fixes: https://github.com/go-gitea/gitea/issues/27604 Add negative margins so the header covers any shadow of active elements. No rendering change of the content of the header because the padding counteracts the effect. image Co-authored-by: silverwind --- web_src/css/repo.css | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/web_src/css/repo.css b/web_src/css/repo.css index 956c799046..fdab04cdd5 100644 --- a/web_src/css/repo.css +++ b/web_src/css/repo.css @@ -1497,7 +1497,8 @@ position: sticky; top: 0; z-index: 8; - padding: 7px 0; + padding: 7px 5px; + margin: 0 -5px; /* negative margin so it covers active file shadow */ height: 44px; /* this height should match sticky-2nd-row */ background: var(--color-body); }