Skip to content

Commit c72ac89

Browse files
committed
fix tabbar issue on ipad
1 parent 3468524 commit c72ac89

File tree

3 files changed

+5
-38
lines changed

3 files changed

+5
-38
lines changed

src/app/tabs/tabs.page.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<ion-tabs>
1+
<ion-tabs >
22
<div class="page-padding-bottom">
33
</div>
44
<ion-tab-bar class="tabbar" slot="bottom" color="dark">

src/app/tabs/tabs.page.scss

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +0,0 @@
1-
.bottom-sheet {
2-
position: fixed;
3-
left: 0;
4-
right: 0;
5-
bottom: 40px; // stays under the tab-bar
6-
height: 90vh; // <-- max-height breakpoint
7-
background: var(--ion-color-dark);
8-
border-radius: 16px 16px 0 0;
9-
box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.15);
10-
transition: transform 0.3s ease;
11-
z-index: 10;
12-
will-change: transform;
13-
/* Optional, avoids flash of full sheet before TS runs */
14-
transform: translateY(calc(90vh - 120px)); // collapsed offset (min-height)
15-
}
16-
17-
.drag-handle {
18-
width: 40px;
19-
height: 5px;
20-
background: #ccc;
21-
border-radius: 5px;
22-
margin: 10px auto;
23-
}
24-
25-
.backdrop {
26-
position: fixed;
27-
inset: 0; // shorthand for top/left/right/bottom
28-
background: rgba(0,0,0,.3);
29-
z-index: 5;
30-
}
31-
32-
.page-padding-bottom {
33-
margin-bottom: 300px; // Adjust as needed to ensure content is not obscured by the tab bar
34-
}
35-

src/global.scss

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,14 @@
5555
// --height: 50%;
5656
--border-radius: 16px;
5757
// --box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
58-
margin-bottom: calc(50px + var(--ion-safe-area-bottom, 0));
58+
margin-bottom: calc(8vh + var(--ion-safe-area-bottom, 12px)); // Adjust for tab bar and safe area
5959
// margin-bottom: (var(--ion-safe-area-bottom, 0) + 50px);
6060
--width: 100%;
6161
}
6262

63-
/* src/global.scss */
63+
ion-tab-bar {
64+
height: 8vh; /* Sets height to 8% of the viewport's height */
65+
}
6466

6567
/* Regular */
6668
@font-face {

0 commit comments

Comments
 (0)