switch.less
5.57 KB
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
/*!
*/
.km-switch input[type=checkbox]
{
display: none;
}
.km-switch,
.km-checkbox
{
text-align: left;
font-size: 1rem;
display: inline-block;
width: 6.4rem;
height: 2rem;
line-height: 2rem;
position: relative;
overflow: hidden;
}
.km-switch-wrapper,
.km-slider-wrapper
{
display: block;
height: 100%;
width: 100%;
overflow: hidden;
}
.km-switch-background,
.km-slider-background
{
display: block;
margin: 0 1px 1px -5em;
height: 100%;
width: 200%;
}
.km-switch-container
{
top: 0;
left: 0;
position: absolute;
display: block;
height: 100%;
width: 100%;
overflow: hidden;
background: transparent;
.box-sizing(border-box);
}
.km-checkbox
{
width: 1.8rem;
height: 1.8rem;
}
.km-checkbox-checked:after
{
content: "\a0";
display: block;
width: 100%;
height: 100%;
}
.km-switch-handle
{
top: 0;
left: 0;
width: 2.72em;
height: 100%;
display: inline-block;
margin: -1px 0 0 -1px;
background-color: #000;
}
.km-switch-label-on,
.km-switch-label-off
{
display: block;
width: 130%;
font-size: 1em;
line-height: 2em;
text-align: center;
position: absolute;
text-transform: uppercase;
}
.km-switch-label-off
{
left: 104%;
}
.km-switch-label-on
{
left: -134%;
text-shadow: 0 -1px 0 rgba(0,0,0,.3);
}
.km-list .km-switch
{
position: absolute;
top: 50%;
right: .8rem;
margin-top: -1rem;
}