summaryrefslogtreecommitdiffstats
path: root/web_src
diff options
context:
space:
mode:
authorPercy Ma <kecrily@gmail.com>2022-12-04 16:56:10 +0800
committerGitHub <noreply@github.com>2022-12-04 08:56:10 +0000
commit9eb9cf5153160e38a25dbbdeeb223fac769879db (patch)
treee3ca8c2d7e2548f8ca8fd7b255f98995b44eb333 /web_src
parentd084ce306aabd99ee4d63934984544ee61760b27 (diff)
downloadgitea-9eb9cf5153160e38a25dbbdeeb223fac769879db.tar.gz
gitea-9eb9cf5153160e38a25dbbdeeb223fac769879db.zip
fix(web): reduce page jitter on browsers that support overlay scrollbar (#21850)
Reduce jitter caused by the presence or absence of scrollbars in page switching --- Ref [scrollbar-gutter | MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/scrollbar-gutter) https://user-images.githubusercontent.com/45708948/165972251-7d5a5017-f76d-4ba2-9106-a224b3ee521f.mp4
Diffstat (limited to 'web_src')
-rw-r--r--web_src/less/_base.less7
1 files changed, 7 insertions, 0 deletions
diff --git a/web_src/less/_base.less b/web_src/less/_base.less
index 14b69dec49..e156ccd6cc 100644
--- a/web_src/less/_base.less
+++ b/web_src/less/_base.less
@@ -222,6 +222,13 @@ body {
overflow-wrap: break-word;
}
+@supports (overflow: overlay) {
+ body {
+ overflow: overlay;
+ scrollbar-gutter: stable;
+ }
+}
+
img {
border-radius: 3px;
}