1
0
mirror of https://github.com/go-gitea/gitea.git synced 2024-11-04 08:17:24 -05:00

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.

<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>
This commit is contained in:
Giteabot 2023-10-20 23:44:46 +08:00 committed by GitHub
parent 6dce671d02
commit 345d70f7e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1497,7 +1497,8 @@
position: sticky; position: sticky;
top: 0; top: 0;
z-index: 8; 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 */ height: 44px; /* this height should match sticky-2nd-row */
background: var(--color-body); background: var(--color-body);
} }