Revert "fix(ui): prevent layout shifts with a stable scrollbar gutter"

This reverts commit 5756a4cda4.
This commit is contained in:
Andras Bacsai
2026-10-12 15:14:30 +02:00
parent 5756a4cda4
commit da426914ca
2 changed files with 1 additions and 5 deletions
-2
View File
@@ -288,8 +288,6 @@ select,
html {
color-scheme: light;
/* Reserve the scrollbar space so the layout does not shift when a page starts or stops scrolling. */
scrollbar-gutter: stable;
}
html.dark {
+1 -3
View File
@@ -1262,9 +1262,7 @@ export function initializeTerminalComponent() {
bodyOverscroll: document.body.style.getPropertyValue('overscroll-behavior'),
};
// html keeps a stable scrollbar gutter, so only pad when the browser has no gutter.
const hasStableGutter = getComputedStyle(document.documentElement).scrollbarGutter.startsWith('stable');
const scrollbarGap = hasStableGutter ? 0 : Math.max(0, window.innerWidth - document.documentElement.clientWidth);
const scrollbarGap = Math.max(0, window.innerWidth - document.documentElement.clientWidth);
document.documentElement.style.setProperty('overflow', 'hidden', 'important');
document.documentElement.style.setProperty('overscroll-behavior', 'none', 'important');