From: Giteabot Date: Fri, 20 Oct 2023 15:44:46 +0000 (+0800) Subject: Fix sticky diff header background (#27697) (#27712) X-Git-Tag: v1.21.0~62 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=345d70f7e44dee91fe6493a37efd8cc2f28cb222;p=gitea.git 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 --- 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); }