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
This commit is contained in:
Percy Ma 2022-12-04 16:56:10 +08:00 committed by GitHub
parent d084ce306a
commit 9eb9cf5153
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -222,6 +222,13 @@ body {
overflow-wrap: break-word; overflow-wrap: break-word;
} }
@supports (overflow: overlay) {
body {
overflow: overlay;
scrollbar-gutter: stable;
}
}
img { img {
border-radius: 3px; border-radius: 3px;
} }