aboutsummaryrefslogtreecommitdiffstats
path: root/web_src/css
diff options
context:
space:
mode:
authorJimmy Praet <jimmy.praet@ksz-bcss.fgov.be>2023-04-05 01:51:42 +0200
committerGitHub <noreply@github.com>2023-04-05 07:51:42 +0800
commit54197b67f988bd8e425c542934dfa2517d1152f3 (patch)
treec33aa39316e946284498463e39a054615a00b9a5 /web_src/css
parent0983b237d50c8648f96f42e776c4529072e7eca9 (diff)
downloadgitea-54197b67f988bd8e425c542934dfa2517d1152f3.tar.gz
gitea-54197b67f988bd8e425c542934dfa2517d1152f3.zip
Scroll collapsed file into view (#23702)
Diffstat (limited to 'web_src/css')
-rw-r--r--web_src/css/repository.css7
-rw-r--r--web_src/css/review.css4
2 files changed, 9 insertions, 2 deletions
diff --git a/web_src/css/repository.css b/web_src/css/repository.css
index 90faf3cf66..a802222394 100644
--- a/web_src/css/repository.css
+++ b/web_src/css/repository.css
@@ -1867,6 +1867,13 @@
.diff-file-box {
border: 1px solid transparent;
border-radius: var(--border-radius);
+ scroll-margin-top: 47px; /* match .repository .diff-detail-box */
+}
+
+@media (max-width: 991px) {
+ .diff-file-box {
+ scroll-margin-top: 77px; /* match .repository .diff-detail-box */
+ }
}
/* TODO: this can potentially be made "global" by removing the class prefix */
diff --git a/web_src/css/review.css b/web_src/css/review.css
index 07f9a9d2ad..c00a536491 100644
--- a/web_src/css/review.css
+++ b/web_src/css/review.css
@@ -246,12 +246,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;
}
}