/
label.scss
82 lines (58 loc) · 1.34 KB
/
label.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
@import "../../themes/ionic.globals";
// Label
// --------------------------------------------------
:host-context(.item) {
/**
* @prop --color: Color of the label
*/
--color: initial;
display: block;
color: var(--color);
font-family: $font-family-base;
font-size: inherit;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
box-sizing: border-box;
}
:host(.ion-color) {
color: current-color(base);
}
:host([text-wrap]) {
white-space: normal;
}
:host-context(.item-interactive-disabled) {
cursor: default;
opacity: .3;
pointer-events: none;
}
:host-context(.item-input) {
flex: initial;
max-width: 200px;
pointer-events: none;
}
// Fixed Inputs
// --------------------------------------------------
:host(.label-fixed) {
flex: 0 0 100px;
width: 100px;
min-width: 100px;
max-width: 200px;
}
// Stacked & Floating Inputs
// --------------------------------------------------
:host(.label-stacked),
:host(.label-floating) {
@include margin(null, null, 0, null);
align-self: stretch;
width: auto;
max-width: 100%;
}
:host-context(.item-has-focus).label-floating,
:host-context(.item-has-placeholder).label-floating,
:host-context(.item-has-value).label-floating {
@include transform(translate3d(0, 0, 0), scale(.8));
}
:host(.label-no-animate.label-floating) {
transition: none;
}