Skip to content

Commit

Permalink
fix(web): reduce page jitter on browsers that support overlay scrollb…
Browse files Browse the repository at this point in the history
…ar (#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
  • Loading branch information
kecrily authored Dec 4, 2022
1 parent d084ce3 commit 9eb9cf5
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions web_src/less/_base.less
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,13 @@ body {
overflow-wrap: break-word;
}

@supports (overflow: overlay) {
body {
overflow: overlay;
scrollbar-gutter: stable;
}
}

img {
border-radius: 3px;
}
Expand Down

0 comments on commit 9eb9cf5

Please sign in to comment.