0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-12-25 17:04:12 -05:00

Add scroll-margin-top to account for sticky header (#16269)

Fixes #16263

Co-authored-by: zeripath <art27@cantab.net>
This commit is contained in:
Jimmy Praet 2021-06-27 16:36:49 +02:00 committed by GitHub
parent f533b5d5cf
commit eee03ae90a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 1 deletions

View file

@ -1343,7 +1343,7 @@ function initPullRequestReview() {
$(`#code-comments-${id}`).removeClass('hide'); $(`#code-comments-${id}`).removeClass('hide');
$(`#code-preview-${id}`).removeClass('hide'); $(`#code-preview-${id}`).removeClass('hide');
$(`#hide-outdated-${id}`).removeClass('hide'); $(`#hide-outdated-${id}`).removeClass('hide');
$(window).scrollTop(commentDiv.offset().top); commentDiv[0].scrollIntoView();
} }
} }
} }

View file

@ -173,3 +173,11 @@ a.blob-excerpt:hover {
.review-box > .segment { .review-box > .segment {
border: none !important; border: none !important;
} }
.pull.files.diff [id] {
scroll-margin-top: 99px;
@media @mediaMdAndDown {
scroll-margin-top: 130px;
}
}