Skip to content

Commit fa1cc64

Browse files
committed
Fix dialog scrollbar shifting
1 parent c5b4d93 commit fa1cc64

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

scss/_dialog.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ $dialog-sizes: defaults(
6262
// Prevent body scroll when dialog is open
6363
.dialog-open {
6464
overflow: hidden;
65-
scrollbar-gutter: stable;
6665
}
6766

6867
.dialog {

scss/_root.scss

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,9 @@ $root-tokens: map.set($root-tokens, --radius-pill, 50rem);
172172
@include tokens($root-tokens);
173173

174174
color-scheme: light dark;
175+
// Always reserve the viewport scrollbar gutter so layout doesn't shift
176+
// when overflow: hidden is applied (e.g. when a dialog opens on Windows).
177+
scrollbar-gutter: stable;
175178
}
176179

177180
[data-bs-theme="dark"] {

0 commit comments

Comments
 (0)