Skip to content

Commit 299f803

Browse files
committed
style: set scrollbar-gutter to prevent layout shift
1 parent f75391d commit 299f803

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/App.css

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,18 @@
4444
-moz-osx-font-smoothing: grayscale;
4545
}
4646

47+
/*
48+
* Set scrollbar-gutter to prevent sidebar-induced layout shift on Windows
49+
* https://github.com/saadeghi/daisyui/issues/2859#issuecomment-2383862183
50+
* https://github.com/saadeghi/daisyui/discussions/3246#discussioncomment-11738876
51+
*/
52+
html {
53+
scrollbar-gutter: auto !important;
54+
}
55+
html:has(body.content-overflow-y) {
56+
scrollbar-gutter: stable !important;
57+
}
58+
4759
.logo {
4860
@apply h-48 p-6 transition duration-1000;
4961
will-change: filter;

0 commit comments

Comments
 (0)