forked from mhartington/ion-md-input
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ion-md-input.scss
83 lines (81 loc) · 1.76 KB
/
ion-md-input.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
$light: #fff !default;
$stable: #f8f8f8 !default;
$positive: #387ef5 !default;
$calm: #11c1f3 !default;
$balanced: #33cd5f !default;
$energized: #ffc900 !default;
$assertive: #ef473a !default;
$royal: #886aea !default;
$dark: #444 !default;
.item-md-label {
display: block;
background-color: transparent;
box-shadow: none;
padding-top: 30px;
padding-bottom: 0;
.input-label {
position: absolute;
padding: 5px 0 0;
z-index: 2;
-webkit-transform: translate3d(0, -30px, 0) scale(1);
transform: translate3d(0, -30px, 0) scale(1);
-webkit-transition: all 0.2s ease;
transition: all 0.2s ease;
color: $dark;
opacity: 0.5;
transform-origin: 0;
}
input {
z-index: 1;
position: relative;
bottom: 0;
}
.highlight {
position: absolute;
bottom: 0;
height: 2px;
left: 0;
width: 100%;
-webkit-transform: translate3d(-100%, 0, 0);
transform: translate3d(-100%, 0, 0);
-webkit-transition: all 0.15s ease;
transition: all 0.15s ease;
}
.highlight-light {
background: $light;
}
.highlight-stable {
background: $stable;
}
.highlight-positive {
background: $positive;
}
.highlight-calm {
background: $calm;
}
.highlight-balanced {
background: $balanced;
}
.highlight-energized {
background: $energized;
}
.highlight-assertive {
background: $assertive;
}
.highlight-royal {
background: $royal;
}
.highlight-dark {
background: $dark;
}
input:focus ~ .input-label,
input.used ~ .input-label {
-webkit-transform: translate3d(0, -60px, 0) scale(0.9);
transform: translate3d(0, -60px, 0) scale(0.9);
opacity: 1;
}
input:focus ~ .highlight {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}