forked from kaiostech/sample-react
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathInput.module.css
More file actions
55 lines (48 loc) · 927 Bytes
/
Input.module.css
File metadata and controls
55 lines (48 loc) · 927 Bytes
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
.input {
display: flex;
flex-direction: column;
margin: 5px 10px;
position: relative;
padding-top: 7px;
}
.input input {
font-family: inherit;
width: 100%;
border: 0;
border-bottom: 1px solid #d2d2d2;
outline: 0;
font-size: 16px;
color: transparent;
padding: 7px 0;
background: transparent;
transition: border-color 0.2s;
}
.input label {
position: absolute;
bottom: 0;
color: #9b9b9b;
}
.input input::placeholder {
color: transparent;
}
.input input:placeholder-shown ~ label {
font-size: 16px;
cursor: text;
top: 20px;
}
.input input[nav-selected="true"] ~ label {
position: absolute;
top: 0;
display: block;
transition: 0.2s;
font-size: 12px;
color: #9b9b9b;
}
.input input[nav-selected="true"] ~ label {
color: #9b27af;
}
.input input[nav-selected="true"] {
padding-bottom: 6px;
border-bottom: 2px solid #9b27af;
text-shadow: 0 0 0 rgba(0, 0, 0, 1);
}