]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Fix dialog scrollbar shifting
authorMark Otto <markdotto@gmail.com>
Fri, 1 May 2026 18:10:17 +0000 (11:10 -0700)
committerMark Otto <markdotto@gmail.com>
Fri, 1 May 2026 18:10:17 +0000 (11:10 -0700)
scss/_dialog.scss
scss/_root.scss

index a9b268362920490b3626465fcf147d5c28e49cbc..74f9000768bb8a2349e7c026d510e9449c2c9009 100644 (file)
@@ -62,7 +62,6 @@ $dialog-sizes: defaults(
   // Prevent body scroll when dialog is open
   .dialog-open {
     overflow: hidden;
-    scrollbar-gutter: stable;
   }
 
   .dialog {
index 1eca05d7a2f56262d475aa087f44d6ec590823e7..0d5a7afe99dadae00734854a749dd456e54ab1e5 100644 (file)
@@ -172,6 +172,9 @@ $root-tokens: map.set($root-tokens, --radius-pill, 50rem);
   @include tokens($root-tokens);
 
   color-scheme: light dark;
+  // Always reserve the viewport scrollbar gutter so layout doesn't shift
+  // when overflow: hidden is applied (e.g. when a dialog opens on Windows).
+  scrollbar-gutter: stable;
 }
 
 [data-bs-theme="dark"] {