perf(frontend): avoid main thread scroll repaint
This commit is contained in:
parent
811077ca66
commit
18355a0838
|
@ -178,6 +178,14 @@ rt {
|
||||||
overflow: clip;
|
overflow: clip;
|
||||||
overflow-y: scroll;
|
overflow-y: scroll;
|
||||||
overscroll-behavior: contain;
|
overscroll-behavior: contain;
|
||||||
|
|
||||||
|
/*
|
||||||
|
理屈は知らないけど、ここでbackgroundを設定しておかないと
|
||||||
|
スクロールコンテナーが少なくともChromeにおいて
|
||||||
|
main thread scrolling になってしまい、パフォーマンスが(多分)落ちる。
|
||||||
|
backgroundが透明だと裏側を描画しないといけなくなるとかそういう理由かもしれない
|
||||||
|
*/
|
||||||
|
background: var(--MI_THEME-bg);
|
||||||
}
|
}
|
||||||
|
|
||||||
._pageScrollableReversed {
|
._pageScrollableReversed {
|
||||||
|
|
|
@ -233,7 +233,7 @@ body {
|
||||||
}
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
/* NOTE: htmlにも overflow: clip を設定したいところだが、設定すると何故か少なくともChromeでhtmlがmain thread scroll repaint扱いになりパフォーマンスが(多分)落ちる */
|
/* NOTE: htmlにも overflow: clip を設定したいところだが、設定すると何故か少なくともChromeで html が main thread scrolling になりパフォーマンスが(多分)落ちる */
|
||||||
overflow: clip;
|
overflow: clip;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -223,7 +223,7 @@ body {
|
||||||
}
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
/* NOTE: htmlにも overflow: clip を設定したいところだが、設定すると何故か少なくともChromeでhtmlがmain thread scroll repaint扱いになりパフォーマンスが(多分)落ちる */
|
/* NOTE: htmlにも overflow: clip を設定したいところだが、設定すると何故か少なくともChromeで html が main thread scrolling になりパフォーマンスが(多分)落ちる */
|
||||||
overflow: clip;
|
overflow: clip;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue