]> source.dussan.org Git - gitea.git/commitdiff
Fix sticky diff header background (#27697) (#27712)
authorGiteabot <teabot@gitea.io>
Fri, 20 Oct 2023 15:44:46 +0000 (23:44 +0800)
committerGitHub <noreply@github.com>
Fri, 20 Oct 2023 15:44:46 +0000 (17:44 +0200)
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.

<img width="128" alt="image"
src="https://github.com/go-gitea/gitea/assets/115237/3d0f55b6-9351-4985-a290-da9a92d15b4e">

Co-authored-by: silverwind <me@silverwind.io>
web_src/css/repo.css

index 956c7990467e69c64da89e39b5e82a8412f7429c..fdab04cdd5d670273c0b26720093032fa81b0f54 100644 (file)
   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);
 }