Skip to content

Commit 710eac3

Browse files
committed
refactor(tab-bar): update styles
1 parent a8ce57b commit 710eac3

File tree

2 files changed

+24
-22
lines changed

2 files changed

+24
-22
lines changed

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

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,6 @@
99
align-items: center;
1010
justify-content: center;
1111

12-
/* stylelint-disable */
13-
padding-right: var(--ion-safe-area-right);
14-
padding-bottom: var(--ion-safe-area-bottom, 0);
15-
padding-left: var(--ion-safe-area-left);
16-
/* stylelint-enable */
17-
1812
border-top: var(--border);
1913

2014
background: var(--background);
@@ -38,9 +32,6 @@
3832
}
3933

4034
:host([slot="top"]) {
41-
padding-top: var(--ion-safe-area-top, 0);
42-
padding-bottom: 0;
43-
4435
border-top: 0;
4536
border-bottom: var(--border);
4637
}
@@ -58,4 +49,16 @@
5849
width: auto;
5950

6051
contain: strict;
52+
53+
/* stylelint-disable */
54+
padding-bottom: var(--ion-safe-area-bottom, 0);
55+
56+
padding-right: var(--ion-safe-area-right);
57+
padding-left: var(--ion-safe-area-left);
58+
/* stylelint-enable */
59+
}
60+
61+
:host([slot="top"].tab-bar-full) {
62+
padding-top: var(--ion-safe-area-top, 0);
63+
padding-bottom: 0;
6164
}

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

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -19,32 +19,31 @@
1919
*/
2020
min-height: calc(globals.$ionic-scale-1400 - calc(globals.$ionic-space-100 * 2));
2121

22+
gap: globals.$ionic-space-300;
23+
24+
// TODO(ROU-10853): replace this value with a layer token
25+
z-index: 10;
26+
}
27+
28+
// Tab Bar Expand
29+
// --------------------------------------------------
30+
31+
/* Full */
32+
:host(.tab-bar-full) {
2233
/* stylelint-disable */
2334
padding-top: globals.$ionic-space-100;
2435
padding-bottom: calc(globals.$ionic-space-100 + var(--ion-safe-area-bottom, 0));
2536

2637
padding-right: calc(globals.$ionic-space-400 + var(--ion-safe-area-right, 0));
2738
padding-left: calc(globals.$ionic-space-400 + var(--ion-safe-area-left, 0));
2839
/* stylelint-enable */
29-
30-
gap: globals.$ionic-space-300;
31-
32-
// TODO(ROU-10853): replace this value with a layer token
33-
z-index: 10;
3440
}
3541

36-
// Tab Bar: Slot
37-
// --------------------------------------------------
38-
39-
/* Top */
40-
:host([slot="top"]) {
42+
:host([slot="top"].tab-bar-full) {
4143
padding-top: calc(globals.$ionic-space-100 + var(--ion-safe-area-top, 0));
4244
padding-bottom: globals.$ionic-space-100;
4345
}
4446

45-
// Tab Bar Expand
46-
// --------------------------------------------------
47-
4847
/* Compact */
4948
:host(.tab-bar-compact) {
5049
@include globals.padding(globals.$ionic-space-100, globals.$ionic-space-400);

0 commit comments

Comments
 (0)