fix(modal): resolve mobile viewport height and centering issues#1668
fix(modal): resolve mobile viewport height and centering issues#1668seojcarlos wants to merge 3 commits intothemesberg:mainfrom
Conversation
Replace h-screen with h-full on the modal root to fix mobile browser viewport issues. On mobile browsers, 100vh includes the area behind the toolbar/address bar, causing the modal close button to be cut off and the modal to appear misaligned. Also add flex flex-col to content.base so the modal content properly fills the available space and works correctly with the position prop for vertical centering. Fixes themesberg#1083 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
🦋 Changeset detectedLatest commit: feceebe The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
@seojcarlos is attempting to deploy a commit to the Bergside Team on Vercel. A member of the Team first needs to authorize it. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughChanged Modal theme classes: replaced Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
Summary
h-screenwithh-fullon modal root to fix mobile browser viewport issuesflex flex-coltocontent.basefor proper content layout and centering100vh(and even100dvh) includes the area behind the toolbar, causing the close button to be cut off and modals to appear misalignedChanges
packages/ui/src/components/Modal/theme.ts:root.base:h-screen→h-full(fixes mobile viewport overflow)content.base: Addedflex flex-col(enables proper vertical content distribution)Root Cause
Mobile browsers (iOS Safari, Chrome, Firefox) report
100vhas larger than the visible viewport because it includes the browser chrome (toolbar/address bar). This causes:Test plan
position="center"Fixes #1083
🤖 Generated with Claude Code
Summary by CodeRabbit
Bug Fixes
Style