Skip to content

Commit

Permalink
Fix sticky diff header background (go-gitea#27697)
Browse files Browse the repository at this point in the history
Fixes: go-gitea#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">
  • Loading branch information
silverwind authored and GiteaBot committed Oct 20, 2023
1 parent 6dce671 commit 7249799
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion web_src/css/repo.css
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 7249799

Please sign in to comment.