fix: add a minimum bottom inset to sheets in the browser - #306
Draft
erdemyerebasmaz wants to merge 1 commit into
Draft
fix: add a minimum bottom inset to sheets in the browser#306erdemyerebasmaz wants to merge 1 commit into
erdemyerebasmaz wants to merge 1 commit into
Conversation
In the mobile browser env(safe-area-inset-bottom) is 0 and the painted home-indicator strip does not exist (that is ios-standalone-bottom-gap, iOS native + standalone PWA only), so sheet content sat nearly flush at the screen bottom while the PWA showed comfortable padding. Floor the inset term at 1em for every context without the strip; platforms with a real inset are unchanged because max() keeps the larger value. Fixes #299
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Closes #299
This PR adds bottom padding to the bottom sheets in the mobile web browser.
On iOS, the installed app (PWA) shows padding and a painted strip below the sheet content. The browser page has no strip, and the safe-area inset is
0. So the sheet content sat almost flush at the screen bottom.The sheet padding now has a minimum inset of
1em, in addition to the base1em. The rule applies only outside the iOS standalone mode. Platforms with a real inset keep their value, because the rule uses the larger of the two (max()).Note: when the keyboard is open and a field has focus, the padding stays
1emon all platforms. This is not changed. If the button must sit higher above the keyboard, that is a separate small change.