-
Notifications
You must be signed in to change notification settings - Fork 342
/
ToggleSwitch.css
52 lines (46 loc) · 1.03 KB
/
ToggleSwitch.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
@value colors: '../../common-ui/colors.css';
@value color11, color2 from colors;
.switch {
cursor: pointer;
text-indent: -9999px;
width: 45px;
height: 20px;
background: #b3b3b37a;
display: flex;
border-radius: 100px;
position: relative;
flex-direction: row;
align-items: center;
&::after {
content: '';
margin-left: -7px;
margin-right: 15px;
width: 18px;
height: 18px;
background: #fff;
border-radius: 90px;
transition: 0.3s;
background-image: url('/img/removeIcon.svg');
background-repeat: no-repeat;
background-position: center;
background-size: 8px;
border: 1px solid #ededed;
}
}
.activeSwitch {
background: color2;
&::after {
background-image: url('/img/check.svg');
background-size: 10px;
right: calc(100% + 5px);
transform: translateX(125%);
}
}
.input {
height: 0;
width: 0;
visibility: hidden;
}
.searchSwitch {
cursor: pointer;
}