4
4
// --------------------------------------------------
5
5
6
6
/// @prop - Width and height of the FAB button
7
- $button- fab-size : 56px !default ;
8
- $button- fab-mini-size : 40px !default ;
9
- $button- fab-content-margin : 10px !default ;
10
- $button- fab-list-margin : 10px !default ;
7
+ $fab-size : 56px !default ;
8
+ $fab-mini-size : 40px !default ;
9
+ $fab-content-margin : 10px !default ;
10
+ $fab-list-margin : 10px !default ;
11
11
12
12
13
- .fab-button {
13
+ .fab {
14
+ @include appearance (none );
15
+
14
16
position : relative ;
15
17
z-index : 0 ;
16
18
display : block ;
17
19
overflow : hidden ;
18
20
19
- width : $button- fab-size ;
20
- height : $button- fab-size ;
21
+ width : $fab-size ;
22
+ height : $fab-size ;
21
23
24
+ border-radius : 50% ;
22
25
font-size : 14px ;
23
- line-height : $button- fab-size ;
26
+ line-height : $fab-size ;
24
27
text-align : center ;
25
28
text-overflow : ellipsis ;
26
29
text-transform : none ;
27
30
white-space : nowrap ;
28
- color : #fff ;
29
- background-color : #327eff ;
30
31
cursor : pointer ;
31
32
transition : background-color , opacity 100ms linear ;
32
33
33
- -moz-appearance : none ;
34
- -webkit-appearance : none ;
35
34
background-clip : padding-box ;
36
35
font-kerning : none ;
37
36
user-select : none ;
@@ -46,16 +45,16 @@ $button-fab-list-margin: 10px !default;
46
45
// FAB mini
47
46
// --------------------------------------------------
48
47
49
- .fab-button [mini ] {
50
- margin : ($button- fab-size - $button- fab-mini-size ) / 2 ;
48
+ .fab [mini ] {
49
+ margin : ($fab-size - $fab-mini-size ) / 2 ;
51
50
52
- width : $button- fab-mini-size ;
53
- height : $button- fab-mini-size ;
51
+ width : $fab-mini-size ;
52
+ height : $fab-mini-size ;
54
53
55
- line-height : $button- fab-mini-size ;
54
+ line-height : $fab-mini-size ;
56
55
57
56
.fab-close-icon {
58
- line-height : $button- fab-mini-size ;
57
+ line-height : $fab-mini-size ;
59
58
}
60
59
}
61
60
@@ -70,37 +69,37 @@ ion-fab {
70
69
& [center ] {
71
70
left : 50% ;
72
71
73
- margin-left : - $button- fab-size / 2 ;
72
+ margin-left : - $fab-size / 2 ;
74
73
}
75
74
76
75
& [middle ] {
77
76
top : 50% ;
78
77
79
- margin-top : - $button- fab-size / 2 ;
78
+ margin-top : - $fab-size / 2 ;
80
79
}
81
80
82
81
& [top ] {
83
- top : $button- fab-content-margin ;
82
+ top : $fab-content-margin ;
84
83
}
85
84
86
85
& [right ] {
87
- right : $button- fab-content-margin ;
86
+ right : $fab-content-margin ;
88
87
}
89
88
90
89
& [bottom ] {
91
- bottom : $button- fab-content-margin ;
90
+ bottom : $fab-content-margin ;
92
91
}
93
92
94
93
& [left ] {
95
- left : $button- fab-content-margin ;
94
+ left : $fab-content-margin ;
96
95
}
97
96
98
97
& [top ][edge ] {
99
- top : - $button- fab-size / 2 ;
98
+ top : - $fab-size / 2 ;
100
99
}
101
100
102
101
& [bottom ][edge ] {
103
- bottom : - $button- fab-size / 2 ;
102
+ bottom : - $fab-size / 2 ;
104
103
}
105
104
}
106
105
@@ -116,32 +115,30 @@ ion-fab-list {
116
115
flex-direction : column ;
117
116
align-items : center ;
118
117
119
- margin : $button- fab-size + $button- fab-list-margin 0 ;
118
+ margin : $fab-size + $fab-list-margin 0 ;
120
119
121
- min-width : $button-fab-size ;
122
- min-height : $button-fab-size ;
120
+ min-width : $fab-size ;
121
+ min-height : $fab-size ;
122
+ }
123
123
124
- .fab-button {
125
- margin : 8px ;
124
+ ion-fab-list .fab-in-list {
125
+ margin : 8px ;
126
126
127
- width : $button- fab-mini-size ;
128
- height : $button- fab-mini-size ;
127
+ width : $fab-mini-size ;
128
+ height : $fab-mini-size ;
129
129
130
- color : #797979 ;
131
- background : #fff ;
132
- opacity : 0 ;
133
- visibility : hidden ;
134
- transform : scale (0 );
135
- transition : all 200ms ease ;
136
- transition-delay : 10ms ;
137
- transition-property : transform , opacity ;
130
+ opacity : 0 ;
131
+ visibility : hidden ;
132
+ transform : scale (0 );
133
+ transition : all 200ms ease ;
134
+ transition-delay : 10ms ;
135
+ transition-property : transform , opacity ;
136
+ }
138
137
139
- & .fab-dial-button-visible {
140
- opacity : 1 ;
141
- visibility : visible ;
142
- transform : scale (1 );
143
- }
144
- }
138
+ ion-fab-list .fab-in-list.show {
139
+ opacity : 1 ;
140
+ visibility : visible ;
141
+ transform : scale (1 );
145
142
}
146
143
147
144
ion-fab-list [side = top ] {
@@ -156,15 +153,15 @@ ion-fab-list[side=left] {
156
153
157
154
flex-direction : row-reverse ;
158
155
159
- margin : 0 $button- fab-size + $button- fab-list-margin ;
156
+ margin : 0 $fab-size + $fab-list-margin ;
160
157
}
161
158
162
159
ion-fab-list [side = right ] {
163
160
left : 0 ;
164
161
165
162
flex-direction : row ;
166
163
167
- margin : 0 $button- fab-size + $button- fab-list-margin ;
164
+ margin : 0 $fab-size + $fab-list-margin ;
168
165
}
169
166
170
167
@@ -181,13 +178,13 @@ ion-fab-list[side=right] {
181
178
right : 0 ;
182
179
left : 0 ;
183
180
184
- line-height : $button- fab-size ;
181
+ line-height : $fab-size ;
185
182
opacity : 0 ;
186
183
transform : scale (.4 ) rotateZ (-45deg );
187
184
transition : all ease-in-out 300ms ;
188
185
}
189
186
190
- .fab-button .button-inner {
187
+ .fab .button-inner {
191
188
transition : all ease-in-out 300ms ;
192
189
}
193
190
0 commit comments