-
Notifications
You must be signed in to change notification settings - Fork 13.5k
/
Copy pathtab-bar.ionic.scss
86 lines (66 loc) · 2.44 KB
/
tab-bar.ionic.scss
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
@use "../../themes/ionic/ionic.globals.scss" as globals;
@use "./tab-bar.common";
:host {
--background: #{globals.$tabbar-ionic-background};
--background-activated: #{globals.$tabbar-ionic-background-activated};
--background-focused: #{globals.$tabbar-ionic-background-focused};
--border: #{globals.$ion-border-size-0} #{globals.$ion-border-style-solid} #{globals.$tabbar-ionic-border-color};
--color: #{globals.$tabbar-ionic-color};
--color-selected: #{globals.$tabbar-ionic-color-selected};
/**
* Tab bar has a box sizing of content-box to ensure the padding
* is not included in the height. This is important for the
* component to adjust to the safe area bottom.
*
* In order for the height to be calculated correctly, the padding
* top and bottom must be excluded from the height calculation.
*/
min-height: calc(globals.$ion-scale-1400 - calc(globals.$ion-space-100 * 2));
gap: globals.$ion-space-300;
box-shadow: #{globals.$ion-elevation-2};
// TODO(ROU-10853): replace this value with a layer token
z-index: 10;
}
// Tab Bar Expand
// --------------------------------------------------
/* Full */
:host(.tab-bar-full) {
/* stylelint-disable */
padding-top: globals.$ion-space-100;
padding-bottom: calc(globals.$ion-space-100 + var(--ion-safe-area-bottom, 0));
padding-right: calc(globals.$ion-space-400 + var(--ion-safe-area-right, 0));
padding-left: calc(globals.$ion-space-400 + var(--ion-safe-area-left, 0));
/* stylelint-enable */
}
:host([slot="top"].tab-bar-full) {
padding-top: calc(globals.$ion-space-100 + var(--ion-safe-area-top, 0));
padding-bottom: globals.$ion-space-100;
}
/* Compact */
:host(.tab-bar-compact) {
@include globals.padding(globals.$ion-space-100, globals.$ion-space-400);
position: absolute;
align-self: center;
width: fit-content;
contain: content;
}
:host([slot="top"].tab-bar-compact) {
top: calc(globals.$ion-space-100 + var(--ion-safe-area-top, 0));
}
:host([slot="bottom"].tab-bar-compact) {
bottom: calc(globals.$ion-space-100 + var(--ion-safe-area-bottom, 0));
}
// Tab Bar Shapes
// --------------------------------------------------
/* Soft */
:host(.tab-bar-soft) {
@include globals.border-radius(globals.$ion-border-radius-400);
}
/* Round */
:host(.tab-bar-round) {
@include globals.border-radius(globals.$ion-border-radius-full);
}
/* Rectangular */
:host(.tab-bar-rectangular) {
@include globals.border-radius(globals.$ion-border-radius-0);
}