forked from ionic-team/ionic-framework
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtabs.ios.scss
More file actions
158 lines (111 loc) · 3.34 KB
/
tabs.ios.scss
File metadata and controls
158 lines (111 loc) · 3.34 KB
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
@import "../../globals.ios";
@import "./tabs";
// iOS Tabs
// --------------------------------------------------
/// @prop - Border on the tabbar (border-top when [tabsPlacement=bottom] and border-bottom when [tabsPlacement=top])
$tabs-ios-border: 1px solid $toolbar-ios-border-color !default;
/// @prop - Background color of the tabbar
$tabs-ios-background: $toolbar-ios-background !default;
/// @prop - Padding on the tab button
$tabs-ios-tab-padding: 0 2px !default;
/// @prop - Max width of the tab button
$tabs-ios-tab-max-width: 240px !default;
/// @prop - Min height of the tab button
$tabs-ios-tab-min-height: 49px !default;
/// @prop - Text color of the inactive tab button
$tabs-ios-tab-color: $toolbar-ios-inactive-color !default;
/// @prop - Text color of the active tab button
$tabs-ios-tab-color-active: $toolbar-ios-active-color !default;
/// @prop - Font size of the tab button text
$tabs-ios-tab-font-size: 10px !default;
/// @prop - Size of the tab button icon
$tabs-ios-tab-icon-size: 30px !default;
ion-tabbar {
justify-content: center;
border-top: $tabs-ios-border;
background: $tabs-ios-background;
}
ion-tabs[tabsPlacement=top] ion-tabbar {
border-top: 0;
border-bottom: $tabs-ios-border;
}
.tab-button {
padding: $tabs-ios-tab-padding;
max-width: $tabs-ios-tab-max-width;
min-height: $tabs-ios-tab-min-height;
color: $tabs-ios-tab-color;
}
.tab-button:hover:not(.disable-hover),
.tab-button[aria-selected=true] {
color: $tabs-ios-tab-color-active;
}
.tab-button-text {
margin-top: 0;
margin-bottom: 0;
min-height: $tabs-ios-tab-font-size + 1;
font-size: $tabs-ios-tab-font-size;
}
.has-title-only .tab-button-text {
font-size: $tabs-ios-tab-font-size + 2;
}
.tab-button-icon {
min-width: $tabs-ios-tab-icon-size + 5;
height: $tabs-ios-tab-icon-size;
font-size: $tabs-ios-tab-icon-size;
&::before {
vertical-align: top;
}
}
[tabsLayout=icon-right] .tab-button,
[tabsLayout=icon-left] .tab-button {
.tab-button-text {
font-size: 1.4rem;
line-height: 1.1;
}
ion-icon {
min-width: 24px;
height: 26px;
font-size: 24px;
}
}
[tabsLayout=icon-hide] .tab-button,
.tab-button.has-title-only {
min-height: $tabs-ios-tab-min-height - 8;
.tab-button-text {
margin: 2px 0;
font-size: 1.4rem;
line-height: 1.1;
}
}
[tabsLayout=title-hide] .tab-button,
.tab-button.icon-only {
min-height: $tabs-ios-tab-min-height - 8;
}
&.hairlines ion-tabs {
ion-tabbar {
border-top-width: $hairlines-width;
}
&[tabsPlacement="top"] ion-tabbar {
border-bottom-width: $hairlines-width;
}
}
// iOS Tabbar Color Mixin
// --------------------------------------------------
@mixin tabbar-ios($color-name, $color-base, $color-contrast) {
ion-tabs[#{$color-name}] ion-tabbar {
border-color: darken($color-base, 10%);
background-color: $color-base;
.tab-button {
color: $color-contrast;
}
.tab-button:hover:not(.disable-hover),
.tab-button[aria-selected=true] {
color: $color-contrast;
}
}
}
// iOS Tabbar Color Generation
// --------------------------------------------------
@each $color-name, $color-base, $color-contrast in get-colors($colors-ios) {
@include tabbar-ios($color-name, $color-base, $color-contrast);
}