Repository navigation
Modal: floating side modals, borders, safe areas, rubber band and iOS toolbar fill; softer dark elevation; iOS overflow scroll lock - #704
Merged
Conversation
size-limit report 📦
|
Start, end and bottom modals now have an offset from the screen edges that respects the browser safe area insets and rounded corners on all sides. Corners facing the screen corners can be customized with --rs-modal-edge-radius. Modal background now uses the base elevation, except for modals with transparentOverlay. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TKGZMho9QKop2wXUJ4QUno
Replace the body position: fixed lock on iOS with overflow: hidden on the viewport scroller (html when it defines its own overflow, body otherwise), matching the Base UI approach. Fixing the body collapsed the document height and made Safari 26 lose its translucent toolbars while an overlay was open. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TKGZMho9QKop2wXUJ4QUno
- Split safe area values into their own variables so the inset formulas are written once, RTL only swaps the safe areas and contained modals zero them - Resolve the edge radius fallback once on the modal root - Read the modal computed style once per touchstart - StyleCache now reads original values through the style object, so camelCase keys like paddingRight and scrollbarGutter are restored on reset - lockSafari checks the overflow longhands only Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TKGZMho9QKop2wXUJ4QUno
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TKGZMho9QKop2wXUJ4QUno
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TKGZMho9QKop2wXUJ4QUno
…vation - Restore the original start, end and bottom modal geometry and drop the safe area offsets, along with the related swipe distance change - Round only the corners facing away from the screen edge for start and end - Restore the overlay elevation background for modals - Move dark mode raised and overlay elevation colors closer to base (0.22 -> 0.21, 0.24 -> 0.22) and regenerate the slate theme Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TKGZMho9QKop2wXUJ4QUno
- Add the safe area insets to the padding on the sides attached to the screen edges for bottom, start and end modals - Damp dragging past the open position with a rubber band effect and keep the screen edge covered with a background bleed behind the modal - Set dark elevation colors to raised 0.215 and overlay 0.23 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TKGZMho9QKop2wXUJ4QUno
Render a fixed strip with the modal background at the bottom screen edge behind non-contained bottom modals, the same approach as the Base UI drawer demo, so iOS Safari fills its floating toolbar area with the modal color. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TKGZMho9QKop2wXUJ4QUno
- Bring back the edge offset for start and end modals, respecting the safe areas, with a larger offset on the side far from the screen edge - Round all corners of start and end modals - Remove the bleed shadow, floating side modals don't need it and the bottom edge strip covers the bottom modal overshoot - Add a neutral faded border to all modals except full-screen, bottom only renders it on the top side Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TKGZMho9QKop2wXUJ4QUno
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TKGZMho9QKop2wXUJ4QUno
blvdmitry
force-pushed
the
claude/pensive-edison-2wqj9s
branch
from
November 8, 2026 22:19
978e870 to
3edaa5d
Compare
- Own the padding with --rs-modal-p instead of the padding mixin, so the safe area is added without a higher specificity override, and switch the safe area per position with a single --rs-modal-safe variable - Render the bottom edge strip only while the modal is active - Drop the unused --rs-modal-drag fallback - Pair dampOvershoot with undampOvershoot and read the modal computed style once per touchstart Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TKGZMho9QKop2wXUJ4QUno
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Modal
startandendmodals float--rs-unit-x2away from the screen edges, or the safe-area inset when that's larger, and round all their corners.--rs-unit-x6for the overlay.full-screenget a 1pxborder-neutral-fadedborder.bottomonly has it on the top side.bottommodals addenv(safe-area-inset-*)to their padding on the sides attached to the screen edges.--rs-modal-p, the same pattern as Table, instead of the padding mixin.--rs-modal-safeswitch (1 for bottom, 0 otherwise), so responsive positions reset it.-sqrt(distance), like Base UI'suseSwipeDismiss, and springs back on release.bottommodal is active, Modal renders aposition: fixedstrip with the modal background at the bottom screen edge, behind the modal. It is the same approach as Base UI's drawer demo (mui/base-ui#4870). Safari 26 fills its floating toolbar area with the colour of fixed elements attached to the edge, and the strip also covers the bottom modal's rubber band overshoot.Dark mode elevation colors
elevation-raisedchanges fromoklch(0.22)tooklch(0.215), andelevation-overlayfromoklch(0.24)tooklch(0.23). They are generated in@reshaped/theming; the slate theme and thegenerateColorssnapshot are updated.lockScroll
overflow-x/y: hiddenon the element that scrolls the page, the same approach as Base UI'suseScrollLock, instead of fixingbody. Fixingbodymade Safari 26 lose its translucent toolbars.StyleCachenow restores camelCase keys likepaddingRightandscrollbarGutter. Before, they were saved as empty strings.Related Issue
None
Screenshots / Recordings
Checked locally in Storybook in light and dark mode, LTR and RTL, with CDP touch events:
Notes for Reviewers
full-screendoesn't add safe areas or a border.overflow: hiddenwhen Safari's toolbar is collapsed.🤖 Generated with Claude Code
https://claude.ai/code/session_01TKGZMho9QKop2wXUJ4QUno