forked from ionic-team/ionic-framework
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtabs.wp.scss
More file actions
141 lines (100 loc) · 3.54 KB
/
tabs.wp.scss
File metadata and controls
141 lines (100 loc) · 3.54 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
@import "../../globals.wp";
@import "./tabs";
// Windows Tabs
// --------------------------------------------------
/// @prop - Background color of the tabbar
$tabs-wp-background: $toolbar-wp-background !default;
/// @prop - Padding on the tab button
$tabs-wp-tab-padding: 12px 10px 5px 10px !default;
/// @prop - Min height of the tab button
$tabs-wp-tab-min-height: 4.8rem !default;
/// @prop - Font size of the tab button text
$tabs-wp-tab-font-size: 1.2rem !default;
/// @prop - Font weight of the tab button text
$tabs-wp-tab-font-weight: normal !default;
/// @prop - Opacity of the inactive tab button
$tabs-wp-tab-opacity: .7 !default;
/// @prop - Text color of the inactive tab button
$tabs-wp-tab-color: rgba($toolbar-wp-inactive-color, $tabs-wp-tab-opacity) !default;
/// @prop - Text color of the active tab button
$tabs-wp-tab-color-active: $toolbar-wp-active-color !default;
/// @prop - Border on the inactive tab button (border-top when [tabsPlacement=bottom] and border-bottom when [tabsPlacement=top])
$tabs-wp-tab-border: 2px solid transparent !default;
/// @prop - Border color on the active tab button (border-top when [tabsPlacement=bottom] and border-bottom when [tabsPlacement=top])
$tabs-wp-tab-border-color-active: $tabs-wp-tab-color-active !default;
/// @prop - Background of the tab button when pressed
$tabs-wp-tab-background-activated: rgba(0, 0, 0, .1) !default;
/// @prop - Size of the tab button icon
$tabs-wp-tab-icon-size: 2.4rem !default;
ion-tabbar {
background: $tabs-wp-background;
}
.tab-button {
padding: $tabs-wp-tab-padding;
min-height: $tabs-wp-tab-min-height;
border-bottom: $tabs-wp-tab-border;
border-radius: 0;
font-size: $tabs-wp-tab-font-size;
font-weight: $tabs-wp-tab-font-weight;
color: $tabs-wp-tab-color;
box-shadow: none;
&[aria-selected=true] {
border-bottom-color: $tabs-wp-tab-border-color-active;
color: $tabs-wp-tab-color-active;
}
&.activated {
background: $tabs-wp-tab-background-activated;
}
}
.tab-button-text {
margin-top: 5px;
margin-bottom: 5px;
}
.tab-button-icon {
min-width: $tabs-wp-tab-icon-size;
font-size: $tabs-wp-tab-icon-size;
}
[tabsLayout=icon-bottom] .tab-button {
padding-top: 8px;
padding-bottom: 8px;
}
[tabsLayout=icon-right] .tab-button,
[tabsLayout=icon-left] .tab-button {
padding-bottom: 10px;
ion-icon {
min-width: 24px;
}
}
[tabsLayout=icon-hide] .tab-button,
[tabsLayout=title-hide] .tab-button,
.tab-button.icon-only,
.tab-button.has-title-only {
padding: 6px 10px;
}
[tabsPlacement=bottom] .tab-button {
border-top: $tabs-wp-tab-border;
border-bottom-width: 0;
&[aria-selected=true] {
border-top-color: $tabs-wp-tab-border-color-active;
}
}
// Windows Tabbar Color Mixin
// --------------------------------------------------
@mixin tabbar-wp($color-name, $color-base, $color-contrast) {
ion-tabs[#{$color-name}] ion-tabbar {
background-color: $color-base;
.tab-button {
color: rgba($color-contrast, $tabs-wp-tab-opacity);
}
.tab-button:hover:not(.disable-hover),
.tab-button[aria-selected=true] {
border-color: $color-contrast;
color: $color-contrast;
}
}
}
// Windows Tabbar Color Generation
// --------------------------------------------------
@each $color-name, $color-base, $color-contrast in get-colors($colors-wp) {
@include tabbar-wp($color-name, $color-base, $color-contrast);
}