-
Notifications
You must be signed in to change notification settings - Fork 13.5k
/
Copy pathalert.ios.scss
460 lines (308 loc) · 13.8 KB
/
alert.ios.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
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
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
@import "../../themes/ionic.globals.ios";
// iOS Alerts
// --------------------------------------------------
/// @prop - Max width of the alert
$alert-ios-max-width: 270px !default;
/// @prop - Border radius of the alert
$alert-ios-border-radius: 13px !default;
/// @prop - Background color of the alert
$alert-ios-background: #f8f8f8 !default;
/// @prop - Box shadow of the alert
$alert-ios-box-shadow: none !default;
/// @prop - Padding of the alert head
$alert-ios-head-padding: 12px 16px 7px !default;
/// @prop - Text align of the alert head
$alert-ios-head-text-align: center !default;
/// @prop - Margin top of the alert title
$alert-ios-title-margin-top: 8px !default;
/// @prop - Font size of the alert title
$alert-ios-title-font-size: 17px !default;
/// @prop - Font weight of the alert title
$alert-ios-title-font-weight: 600 !default;
/// @prop - Font size of the alert sub title
$alert-ios-sub-title-font-size: 14px !default;
/// @prop - Text color of the alert sub title
$alert-ios-sub-title-text-color: #666 !default;
/// @prop - Padding of the alert message
$alert-ios-message-padding: 0 16px 21px !default;
/// @prop - Font size of the alert message
$alert-ios-message-font-size: 13px !default;
/// @prop - Text align of the alert message
$alert-ios-message-text-align: center !default;
/// @prop - Text color of the alert message
$alert-ios-message-text-color: inherit !default;
/// @prop - Padding of the alert empty message
$alert-ios-message-padding-empty: 0 0 12px 0 !default;
/// @prop - Maximum height of the alert content
$alert-ios-content-max-height: 240px !default;
/// @prop - Margin top of the alert input
$alert-ios-input-margin-top: 10px !default;
/// @prop - Padding on the alert input
$alert-ios-input-padding: 6px !default;
/// @prop - Border color of the alert input
$alert-ios-input-border-color: #ccc !default;
/// @prop - Border of the alert input
$alert-ios-input-border: $hairlines-width solid $alert-ios-input-border-color !default;
/// @prop - Border radius of the alert input
$alert-ios-input-border-radius: 4px !default;
/// @prop - Background color of the alert input
$alert-ios-input-background-color: #fff !default;
/// @prop - Flex wrap of the alert button group
$alert-ios-button-group-flex-wrap: wrap !default;
/// @prop - Flex of the alert button
$alert-ios-button-flex: 1 1 auto !default;
/// @prop - Margin of the alert button
$alert-ios-button-margin: 0 !default;
/// @prop - Min width of the alert button
$alert-ios-button-min-width: 50% !default;
/// @prop - Minimum height of the alert button
$alert-ios-button-min-height: 44px !default;
/// @prop - Font size of the alert button
$alert-ios-button-font-size: 17px !default;
/// @prop - Color of the text in the alert button
$alert-ios-button-text-color: color($colors-ios, primary) !default;
/// @prop - Background color of the alert button
$alert-ios-button-background-color: transparent !default;
/// @prop - Background color of the alert activated button
$alert-ios-button-background-color-activated: #e9e9e9 !default;
/// @prop - Border width of the alert button
$alert-ios-button-border-width: $hairlines-width !default;
/// @prop - Border style of the alert button
$alert-ios-button-border-style: solid !default;
/// @prop - Border color of the alert button
$alert-ios-button-border-color: #dbdbdf !default;
/// @prop - Border radius of the alert button
$alert-ios-button-border-radius: 0 !default;
/// @prop - Font weight of the main text on the alert button
$alert-ios-button-main-font-weight: bold !default;
/// @prop - Border top of the alert list
$alert-ios-list-border-top: $alert-ios-button-border-width $alert-ios-button-border-style $alert-ios-button-border-color !default;
/// @prop - Padding on the label for the radio alert
$alert-ios-radio-label-padding: 13px !default;
/// @prop - Text color of the label for the checked radio alert
$alert-ios-radio-label-text-color-checked: $alert-ios-button-text-color !default;
/// @prop - Min width of the radio alert
$alert-ios-radio-min-width: 30px !default;
/// @prop - Top of the icon in the radio alert
$alert-ios-radio-icon-top: -7px !default;
/// @prop - Left of the icon in the radio alert
$alert-ios-radio-icon-left: 7px !default;
/// @prop - Width of the icon in the radio alert
$alert-ios-radio-icon-width: 6px !default;
/// @prop - Height of the icon in the radio alert
$alert-ios-radio-icon-height: 12px !default;
/// @prop - Border width of the icon in the radio alert
$alert-ios-radio-icon-border-width: 2px !default;
/// @prop - Border style of the icon in the radio alert
$alert-ios-radio-icon-border-style: solid !default;
/// @prop - Border color of the icon in the radio alert
$alert-ios-radio-icon-border-color: $alert-ios-button-text-color !default;
/// @prop - Transform of the icon in the radio alert
$alert-ios-radio-icon-transform: rotate(45deg) !default;
/// @prop - Padding of the label for the checkbox in the alert
$alert-ios-checkbox-label-padding: 13px !default;
/// @prop - Text color of the label for the checked checkbox in the alert
$alert-ios-checkbox-label-text-color-checked: initial !default;
/// @prop - Margin of the checkbox in the alert
$alert-ios-checkbox-margin: 10px 6px 10px 16px !default;
/// @prop - Size of the checkbox in the alert
$alert-ios-checkbox-size: 21px !default;
/// @prop - Border width of the checkbox in the alert
$alert-ios-checkbox-border-width: $hairlines-width !default;
/// @prop - Border style of the checkbox in the alert
$alert-ios-checkbox-border-style: solid !default;
/// @prop - Border radius of the checkbox in the alert
$alert-ios-checkbox-border-radius: 50% !default;
/// @prop - Border color of the checkbox in the alert when off
$alert-ios-checkbox-border-color-off: $list-ios-border-color !default;
/// @prop - Border color of the checkbox in the alert when on
$alert-ios-checkbox-border-color-on: color($colors-ios, primary) !default;
/// @prop - Background color of the checkbox in the alert when off
$alert-ios-checkbox-background-color-off: $list-ios-background-color !default;
/// @prop - Background color of the checkbox in the alert when on
$alert-ios-checkbox-background-color-on: color($colors-ios, primary) !default;
/// @prop - Top of the icon in the checkbox alert
$alert-ios-checkbox-icon-top: 4px !default;
/// @prop - Left of the icon in the checkbox alert
$alert-ios-checkbox-icon-left: 7px !default;
/// @prop - Width of the icon in the checkbox alert
$alert-ios-checkbox-icon-width: 4px !default;
/// @prop - Height of the icon in the checkbox alert
$alert-ios-checkbox-icon-height: 9px !default;
/// @prop - Border width of the icon in the checkbox alert
$alert-ios-checkbox-icon-border-width: $alert-ios-checkbox-border-width !default;
/// @prop - Border style of the icon in the checkbox alert
$alert-ios-checkbox-icon-border-style: $alert-ios-checkbox-border-style !default;
/// @prop - Border color of the icon in the checkbox alert
$alert-ios-checkbox-icon-border-color: $background-ios-color !default;
/// @prop - Transform of the icon in the checkbox alert
$alert-ios-checkbox-icon-transform: rotate(45deg) !default;
.alert-ios .alert-wrapper {
overflow: hidden;
max-width: $alert-ios-max-width;
border-radius: $alert-ios-border-radius;
background-color: $alert-ios-background;
box-shadow: $alert-ios-box-shadow;
}
// iOS Alert Header
// --------------------------------------------------
.alert-ios .alert-head {
padding: $alert-ios-head-padding;
text-align: $alert-ios-head-text-align;
}
.alert-ios .alert-title {
margin-top: $alert-ios-title-margin-top;
font-size: $alert-ios-title-font-size;
font-weight: $alert-ios-title-font-weight;
}
.alert-ios .alert-sub-title {
font-size: $alert-ios-sub-title-font-size;
color: $alert-ios-sub-title-text-color;
}
// iOS Alert Message
// --------------------------------------------------
.alert-ios .alert-message,
.alert-ios .alert-input-group {
padding: $alert-ios-message-padding;
font-size: $alert-ios-message-font-size;
text-align: $alert-ios-message-text-align;
color: $alert-ios-message-text-color;
}
.alert-ios .alert-message {
max-height: $alert-ios-content-max-height;
}
.alert-ios .alert-message:empty {
padding: $alert-ios-message-padding-empty;
}
// iOS Alert Input
// --------------------------------------------------
.alert-ios .alert-input {
@include appearance(none);
margin-top: $alert-ios-input-margin-top;
padding: $alert-ios-input-padding;
border: $alert-ios-input-border;
border-radius: $alert-ios-input-border-radius;
background-color: $alert-ios-input-background-color;
}
// iOS Alert Radio/Checkbox Group
// --------------------------------------------------
.alert-ios .alert-radio-group,
.alert-ios .alert-checkbox-group {
overflow: scroll;
max-height: $alert-ios-content-max-height;
border-top: $alert-ios-list-border-top;
-webkit-overflow-scrolling: touch;
}
.alert-ios .alert-tappable {
display: flex;
min-height: $alert-ios-button-min-height;
}
// iOS Alert Radio Label
// --------------------------------------------------
.alert-ios .alert-radio-label {
overflow: hidden;
flex: 1;
order: 0;
padding: $alert-ios-radio-label-padding;
text-overflow: ellipsis;
white-space: nowrap;
}
// iOS Alert Radio Label: Checked
// --------------------------------------------------
.alert-ios [aria-checked=true] .alert-radio-label {
color: $alert-ios-radio-label-text-color-checked;
}
// iOS Alert Radio Checkmark: Unchecked
// -----------------------------------------
.alert-ios .alert-radio-icon {
position: relative;
order: 1;
min-width: $alert-ios-radio-min-width;
}
// iOS Alert Radio Checked
// -----------------------------------------
.alert-ios [aria-checked=true] .alert-radio-inner {
position: absolute;
top: $alert-ios-radio-icon-top;
left: $alert-ios-radio-icon-left;
width: $alert-ios-radio-icon-width;
height: $alert-ios-radio-icon-height;
border-width: $alert-ios-radio-icon-border-width;
border-top-width: 0;
border-left-width: 0;
border-style: $alert-ios-radio-icon-border-style;
border-color: $alert-ios-radio-icon-border-color;
transform: $alert-ios-radio-icon-transform;
}
// iOS Alert Checkbox Label
// --------------------------------------------------
.alert-ios .alert-checkbox-label {
overflow: hidden;
flex: 1;
padding: $alert-ios-checkbox-label-padding;
text-overflow: ellipsis;
white-space: nowrap;
}
.alert-ios [aria-checked=true] .alert-checkbox-label {
color: $alert-ios-checkbox-label-text-color-checked;
}
// iOS Alert Checkbox Outer Circle: Unchecked
// -----------------------------------------
.alert-ios .alert-checkbox-icon {
position: relative;
margin: $alert-ios-checkbox-margin;
width: $alert-ios-checkbox-size;
height: $alert-ios-checkbox-size;
border-width: $alert-ios-checkbox-border-width;
border-style: $alert-ios-checkbox-border-style;
border-radius: $alert-ios-checkbox-border-radius;
border-color: $alert-ios-checkbox-border-color-off;
background-color: $alert-ios-checkbox-background-color-off;
}
// iOS Alert Checkbox Outer Circle: Checked
// -----------------------------------------
.alert-ios [aria-checked=true] .alert-checkbox-icon {
border-color: $alert-ios-checkbox-border-color-on;
background-color: $alert-ios-checkbox-background-color-on;
}
// iOS Alert Checkbox Inner Checkmark: Checked
// -----------------------------------------
.alert-ios [aria-checked=true] .alert-checkbox-inner {
position: absolute;
top: $alert-ios-checkbox-icon-top;
left: $alert-ios-checkbox-icon-left;
width: $alert-ios-checkbox-icon-width;
height: $alert-ios-checkbox-icon-height;
border-width: $alert-ios-checkbox-icon-border-width;
border-top-width: 0;
border-left-width: 0;
border-style: $alert-ios-checkbox-icon-border-style;
border-color: $alert-ios-checkbox-icon-border-color;
transform: $alert-ios-checkbox-icon-transform;
}
// iOS Alert Button
// --------------------------------------------------
.alert-ios .alert-button-group {
flex-wrap: $alert-ios-button-group-flex-wrap;
margin-right: -$alert-ios-button-border-width;
}
.alert-ios .alert-button {
overflow: hidden;
flex: $alert-ios-button-flex;
margin: $alert-ios-button-margin;
min-width: $alert-ios-button-min-width;
height: $alert-ios-button-min-height;
border-top: $alert-ios-button-border-width $alert-ios-button-border-style $alert-ios-button-border-color;
border-right: $alert-ios-button-border-width $alert-ios-button-border-style $alert-ios-button-border-color;
border-radius: $alert-ios-button-border-radius;
font-size: $alert-ios-button-font-size;
color: $alert-ios-button-text-color;
background-color: $alert-ios-button-background-color;
}
.alert-ios .alert-button:last-child {
border-right: 0;
font-weight: $alert-ios-button-main-font-weight;
}
.alert-ios .alert-button.activated {
background-color: $alert-ios-button-background-color-activated;
}