/
form-input.scss
55 lines (47 loc) · 914 Bytes
/
form-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
$sub-color: grey;
$main-color: black;
@mixin shrinkLabel {
top: -14px;
font-size: 12px;
color: $main-color;
}
.group {
position: relative;
margin: 45px 0;
.form-input {
background: none;
background-color: white;
color: $sub-color;
font-size: 18px;
font-family: inherit;
padding: 10px 10px 10px 5px;
display: block;
width: 100%;
border: none;
border-radius: 0;
border-bottom: 1px solid $sub-color;
margin: 25px 0;
&:focus {
outline: none;
}
&:focus ~ .form-input-label {
@include shrinkLabel();
}
}
input[type="password"] {
letter-spacing: 0.3em;
}
.form-input-label {
color: $sub-color;
font-size: 16px;
font-weight: normal;
position: absolute;
pointer-events: none;
left: 5px;
top: 10px;
transition: 300ms ease all;
&.shrink {
@include shrinkLabel();
}
}
}