mirror of
https://github.com/go-gitea/gitea
synced 2025-12-07 13:28:25 +00:00
Backport #23702 by @jpraet Fixes #23701, #23515. Alternate approach to #23604 using CSS scroll-margin-top, which is also taken into account for direct links to files in a diff: * On the PR diff, this currently shows the previous file first: https://try.gitea.io/jpraet/test/pulls/13/files#diff-b94d08b409f9d05fb65b6cccaf7b3e4ecc7cc333 * On the commit diff, the first line of the linked file is currently under the sticky header: https://try.gitea.io/jpraet/test/commit/1a19e6b14e31d295b7372f3346580c3e85690ff5#diff-b94d08b409f9d05fb65b6cccaf7b3e4ecc7cc333 Co-authored-by: Jimmy Praet <jimmy.praet@ksz-bcss.fgov.be>
This commit is contained in:
@@ -242,12 +242,12 @@ a.blob-excerpt:hover {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.pull.files.diff [id] {
|
||||
.pull.files.diff .comment {
|
||||
scroll-margin-top: 99px;
|
||||
}
|
||||
|
||||
@media (max-width: 991px) {
|
||||
.pull.files.diff [id] {
|
||||
.pull.files.diff .comment {
|
||||
scroll-margin-top: 130px;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user