Skip to content

Commit 872e121

Browse files
committed
refactor(tab-bar): update padding and positions
1 parent 2b0db02 commit 872e121

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

core/src/components/tab-bar/tab-bar.ionic.scss

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@
2020
min-height: calc(globals.$ionic-scale-1400 - calc(globals.$ionic-space-100 * 2));
2121

2222
/* stylelint-disable */
23+
padding-top: globals.$ionic-space-100;
2324
padding-bottom: calc(globals.$ionic-space-100 + var(--ion-safe-area-bottom, 0));
25+
2426
padding-right: calc(globals.$ionic-space-400 + var(--ion-safe-area-right, 0));
2527
padding-left: calc(globals.$ionic-space-400 + var(--ion-safe-area-left, 0));
2628
/* stylelint-enable */
@@ -37,16 +39,20 @@
3739
/* Top */
3840
:host([slot="top"]) {
3941
padding-top: calc(globals.$ionic-space-100 + var(--ion-safe-area-top, 0));
40-
padding-bottom: 0;
42+
padding-bottom: globals.$ionic-space-100;
4143
}
4244

4345
// Tab Bar Expand
4446
// --------------------------------------------------
4547

4648
/* Compact */
4749
:host(.tab-bar-compact) {
50+
@include globals.padding(globals.$ionic-space-100, globals.$ionic-space-400);
51+
4852
position: absolute;
4953

54+
bottom: calc(globals.$ionic-space-100 + var(--ion-safe-area-bottom, 0));
55+
5056
align-self: center;
5157

5258
width: fit-content;
@@ -57,11 +63,11 @@
5763
}
5864

5965
:host([slot="top"].tab-bar-compact) {
60-
top: globals.$ionic-space-400;
66+
top: calc(globals.$ionic-space-100 + var(--ion-safe-area-top, 0));
6167
}
6268

6369
:host([slot="bottom"].tab-bar-compact) {
64-
bottom: globals.$ionic-space-400;
70+
bottom: calc(globals.$ionic-space-100 + var(--ion-safe-area-bottom, 0));
6571
}
6672

6773
// Tab Bar Shapes

0 commit comments

Comments
 (0)