Skip to content

Commit 68c5555

Browse files
committed
prevent shadcn select from removing the scrollbar
1 parent 95d13d6 commit 68c5555

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

src/index.css

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,18 @@
123123
* {
124124
@apply border-border outline-ring/50;
125125
}
126+
127+
html {
128+
overflow-y: scroll;
129+
}
130+
131+
/* prevent shadcn selct from removing the scrollbar */
132+
html body[data-scroll-locked] {
133+
margin-right: 0 !important; /* For LTR layout */
134+
margin-left: 0 !important; /* For RTL layout */
135+
overflow-y: visible !important;
136+
}
137+
126138
body {
127139
@apply bg-background text-foreground min-h-screen;
128140
}

0 commit comments

Comments
 (0)