-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsimple-switch.less
52 lines (46 loc) · 1.32 KB
/
simple-switch.less
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
.simple-switch-outter {
width: 50px;
height: 30px;
background-color: #fff;
border: 1px solid #dfdfdf;
cursor: pointer;
display: inline-block;
position: relative;
vertical-align: middle;
border-radius: 20px;
box-sizing: content-box;
background-clip: content-box;
.simple-switch {
display: none;
}
.simple-switch-circle {
background: #fff;
border-radius: 100%;
box-shadow: 0 1px 3px rgba(0,0,0,0.4);
height: 30px;
position: absolute;
top: 0;
width: 30px;
}
&.unchecked {
box-shadow: rgb(223, 223, 223) 0px 0px 0px 0px inset;
border-color: rgb(223, 223, 223);
transition: border 0.4s, box-shadow 0.4s;
background-color: rgb(255, 255, 255);
.simple-switch-circle {
left: 0px;
transition: background-color 0.4s, left 0.2s;
}
}
&.checked {
border-color: rgb(100, 189, 99);
box-shadow: rgb(100, 189, 99) 0px 0px 0px 16px inset;
transition: border 0.4s, box-shadow 0.4s, background-color 1.2s;
background-color: rgb(100, 189, 99);
.simple-switch-circle {
left: 20px;
transition: background-color 0.4s, left 0.2s;
background-color: rgb(255, 255, 255);
}
}
}