Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃悰 fix(bottom-navigation): Bottom navigation respects the iOS safe-area #1354

Merged
merged 2 commits into from Nov 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions src/components/unstyled/bottom-navigation.css
@@ -1,5 +1,6 @@
.btm-nav {
@apply flex flex-row items-center justify-around fixed bottom-0 left-0 right-0 w-full;
padding-bottom: env(safe-area-inset-bottom);
&>* {
@apply flex items-center justify-center flex-col basis-full h-full cursor-pointer relative gap-1;
}
Expand Down
7 changes: 7 additions & 0 deletions src/docs/src/routes/components/bottom-navigation.svelte.md
Expand Up @@ -23,6 +23,13 @@ data="{[
]}"
/>

<div class="alert alert-info text-sm mb-2">
<div>
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" class="stroke-info-content flex-shrink-0 w-6 h-6"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg>
The &lt;meta name="viewport" content="viewport-fit=cover"&gt; is required for responsive of the bottom navigation in iOS.
</div>
</div>

<Component title="Bottom Navigation">
<div class="btm-nav relative">
<button>
Expand Down