-
Notifications
You must be signed in to change notification settings - Fork 13.5k
/
Copy pathlabel.ios.scss
106 lines (79 loc) · 2.12 KB
/
label.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
@import "./label";
@import "./label.ios.vars";
// iOS Label
// --------------------------------------------------
:host(.ion-text-wrap) {
font-size: $label-ios-text-wrap-font-size;
line-height: $label-ios-text-wrap-line-height;
}
// iOS Stacked & Floating Labels
// --------------------------------------------------
:host(.label-stacked) {
@include margin(null, null, 4px, null);
font-size: dynamic-font(14px);
}
:host(.label-floating) {
@include margin(null, null, 0, null);
@include transform(translate(0, 29px));
@include transform-origin(start, top);
transition: transform 150ms ease-in-out;
}
:host-context(.item-textarea).label-floating {
@include transform(translate(0, 28px));
}
:host-context(.item-has-focus).label-stacked,
:host-context(.item-has-focus).label-floating {
color: $label-ios-text-color-focused;
}
:host-context(.item-has-focus).label-floating,
:host-context(.item-has-placeholder:not(.item-input)).label-floating,
:host-context(.item-has-value).label-floating {
@include transform(scale(0.82));
}
// iOS Typography
// --------------------------------------------------
::slotted(*) h1 {
@include margin(3px, 0, 2px);
font-size: dynamic-font(22px);
font-weight: normal;
}
::slotted(*) h2 {
@include margin(0, 0, 2px);
font-size: dynamic-font(17px);
font-weight: normal;
}
::slotted(*) h3,
::slotted(*) h4,
::slotted(*) h5,
::slotted(*) h6 {
@include margin(0, 0, 3px);
font-size: dynamic-font(14px);
font-weight: normal;
line-height: normal;
}
::slotted(*) p {
@include margin(
$item-ios-paragraph-margin-top,
$item-ios-paragraph-margin-end,
$item-ios-paragraph-margin-bottom,
$item-ios-paragraph-margin-start
);
font-size: $item-ios-paragraph-font-size;
line-height: normal;
text-overflow: inherit;
overflow: inherit;
}
::slotted(p) {
color: #{$item-ios-paragraph-text-color};
}
:host(.in-item-color)::slotted(p) {
color: inherit;
}
::slotted(*) h2:last-child,
::slotted(*) h3:last-child,
::slotted(*) h4:last-child,
::slotted(*) h5:last-child,
::slotted(*) h6:last-child,
::slotted(*) p:last-child {
@include margin(null, null, 0, null);
}