fix(drawer): restore transition by default; opt-out via prefers-reduced-motion: reduce#803
fix(drawer): restore transition by default; opt-out via prefers-reduced-motion: reduce#803paanSinghCoder wants to merge 1 commit into
Conversation
…ed-motion: reduce Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe Suggested reviewers
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Description
#717 moved the per-side
transition: transformrules out of.drawerPopup-{right,left,top,bottom}and into@media (prefers-reduced-motion: no-preference), switching the pattern from "default-on, opt-out for reduce" to "opt-in only when no-preference matches."That's brittle: when the browser doesn't reliably report
no-preference, the transition never registers, so the drawer snaps in/out instead of sliding. The bug only affects the four side popups; the backdrop kept its unconditionaltransition: opacityand continued to animate.This PR restores the pre-#717 pattern:
transition: transform 450ms cubic-bezier(...)declared inline on each.drawerPopup-{side}rule@media (prefers-reduced-motion: reduce)block at the bottom that disables transitions for.drawerPopupand.backdropSame a11y intent as #717, more robust default. Matches the pattern used by Dialog (whose transitions are also unconditional with no reduce opt-out today — separate question whether to add one there).
Type of Change
How Has This Been Tested?
prefers-reduced-motion: reduceoverride still disables transitions (tested via Chrome DevTools > Rendering > Emulate CSS media feature).Checklist
Related Issues
Regression introduced by #717.
🤖 Generated with Claude Code