fix(web): honor prefers-reduced-motion; contain overscroll in modal surfaces (#71)
Nothing in the app respected prefers-reduced-motion — the kit's data-open/closed animations, the skeleton pulse, and the sidebar width transition all ran unconditionally. Add a global base-layer rule that collapses animation/transition durations to a single frame when the OS asks for reduced motion; one rule covers current and future additions. Add overscroll-y-contain to the scrollable modal/popup surfaces (DrawerContent, SelectContent, ComboboxPopup) so flicking past the end of their content no longer chain-scrolls the page beneath, and to AlertDialogContent for when it gains scrollable content. Verified in the built CSS: the media query and overscroll-behavior-y:contain both compile into dist/assets. Closes #71 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -99,7 +99,7 @@ function SelectContent({
|
||||
<SelectPrimitive.Popup
|
||||
data-slot="select-content"
|
||||
className={cn(
|
||||
"max-h-[min(24rem,var(--available-height))] min-w-[var(--anchor-width)] overflow-y-auto rounded-md border bg-popover p-1 text-popover-foreground shadow-md outline-none",
|
||||
"max-h-[min(24rem,var(--available-height))] min-w-[var(--anchor-width)] overflow-y-auto overscroll-y-contain rounded-md border bg-popover p-1 text-popover-foreground shadow-md outline-none",
|
||||
"data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",
|
||||
className
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user