pmc-trigger position relative display inline-block -webkit-appearance

 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
69
70
71
72
73
74
75
.pmc-trigger {
position: relative;
display: inline-block;
-webkit-appearance: none;
-moz-appearance: none;
cursor: pointer;
width: 43px;
height: 21px;
margin: 2px 15px 2px 30px;
border-radius: 4px;
background: #c23333;
.linear-gradient(#be2929, #ca4e4e);
border: 0;
transition: all 150ms ease;
&:before,
&:after {
content: '';
display: block;
position: absolute;
}
&:before {
width: 20px;
height: 17px;
border-radius: 4px;
background: #fff;
left: 2px;
top: 2px;
transition: all 200ms ease;
}
&:after {
width: 25px;
height: 17px;
content: 'Off';
left: -25px;
top: 2px;
color: #bd5151;
font-size: 16px;
}
&:checked {
background: #00886a;
.linear-gradient(#008164, #008e6e);
&:before {
left: 21px;
}
&:after {
content: 'On';
color: #168c71;
}
}
[dir=rtl] & {
margin: 2px 30px 2px 15px;
&:after {
right: -25px;
}
&:before {
left: 21px;
}
&:checked {
&:before {
left: 2px;
}
}
}
}