perf(frontend): avoid main thread scroll repaint

This commit is contained in:
syuilo
2025-03-28 16:34:21 +09:00
parent 811077ca66
commit 18355a0838
3 changed files with 10 additions and 2 deletions

View File

@@ -178,6 +178,14 @@ rt {
overflow: clip;
overflow-y: scroll;
overscroll-behavior: contain;
/*
理屈は知らないけど、ここでbackgroundを設定しておかないと
スクロールコンテナーが少なくともChromeにおいて
main thread scrolling になってしまい、パフォーマンスが(多分)落ちる。
backgroundが透明だと裏側を描画しないといけなくなるとかそういう理由かもしれない
*/
background: var(--MI_THEME-bg);
}
._pageScrollableReversed {