From 85442090272368478406eb9fd03bca22920545a9 Mon Sep 17 00:00:00 2001 From: lilydjwg Date: Wed, 8 Feb 2023 22:02:26 +0800 Subject: [PATCH] Make content stable wrt scrollbars --- public/global.css | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/public/global.css b/public/global.css index 3add8b4..a0b53a3 100644 --- a/public/global.css +++ b/public/global.css @@ -12,6 +12,12 @@ body { line-height: 1.2; /* Google Chrome defaults to Times New Roman and for sans-serif it prefers Arial... */ font-family: 'DejaVu Sans', sans-serif; + /* + * Make content stable wrt scrollbars + * scrollbar-gutter doesn't help because width isn't fixed + * https://www.zhangxinxu.com/wordpress/2015/01/css-page-scrollbar-toggle-center-no-jumping/ */ + margin-left: calc(100vw - 100%); + overflow-x: hidden; } a {