Skip to content

Commit 9847225

Browse files
committed
fix(ui): uses CSS scrollbar-width var for navbar compensation
1 parent 617a779 commit 9847225

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

src/app/components/shared/NotificationDrawer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export default function NotificationDrawer(props: NotificationDrawerProps) {
2525
}
2626

2727
return (
28-
<Dialog open={props.open} onOpenChange={(open) => !open && props.onClose()} modal preventScroll={false}>
28+
<Dialog open={props.open} onOpenChange={(open) => !open && props.onClose()} modal>
2929
<Dialog.Portal>
3030
<Dialog.Overlay class="drawer-overlay fixed inset-0 bg-black/50 z-[70]" data-testid="notification-overlay" />
3131
<Dialog.Content class="drawer-content fixed top-0 right-0 h-full w-80 sm:w-96 bg-base-100 shadow-xl z-[71] flex flex-col">

src/app/index.css

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,13 @@
107107
animation: overlay-fade-in 0.3s ease-out forwards;
108108
}
109109

110+
/* ── Fixed-element scrollbar compensation ────────────────────────────────── */
111+
/* solid-prevent-scroll sets --scrollbar-width on body when scroll is locked;
112+
fixed elements don't inherit body padding-right, so compensate explicitly */
113+
.navbar {
114+
padding-right: var(--scrollbar-width, 0px);
115+
}
116+
110117
/* ── Kobalte → daisyUI bridges ───────────────────────────────────────────── */
111118

112119
/* Kobalte Tabs: data-selected → daisyUI tab-active */

0 commit comments

Comments
 (0)