-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcheckbox.css
68 lines (51 loc) · 1.03 KB
/
checkbox.css
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
input[type="checkbox"] {
position: relative;
user-select: none;
/* todo(vmyshko): probably we need to move those before/after into label,
and hide input entirely(visibility: hidden)
but poka chto pokatit
*/
height: 28px;
width: 48px;
cursor: pointer;
}
input[type="checkbox"]::before {
content: "";
display: flex;
position: absolute;
width: 48px;
height: 28px;
border-radius: 16px;
background-color: var(--color-primary);
}
input[type="checkbox"][disabled] {
opacity: 0.5;
}
input[type="checkbox"]::after {
content: "";
display: flex;
position: absolute;
left: 0;
width: 24px;
height: 24px;
margin: 2px;
border-radius: 12px;
background-color: #fff;
z-index: 1;
transition: left 100ms ease-in-out;
}
input[type="checkbox"]:checked::after {
left: 20px;
}
.checkbox {
display: flex;
align-items: center;
cursor: pointer;
}
.checkbox > span {
font-size: 12px;
font-weight: 500;
margin-right: 8px;
color: var(--color-text-light-fade-50);
user-select: none;
}