-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathswitch.css
126 lines (126 loc) · 3.65 KB
/
switch.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
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
.vue-switch {
position: relative;
display: inline-block;
width: 48px;
height: 20px;
line-height: 20px;
border-radius: 20px;
border: 1px solid #d5d5d5;
background-color: #d5d5d5;
cursor: pointer;
-webkit-transition: all 0.21s ease;
transition: all 0.21s ease;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
overflow: hidden;
-webkit-appearance: none;
-webkit-tap-highlight-color: transparent;
-webkit-transform: rotate(0deg);
-ms-transform: rotate(0deg);
transform: rotate(0deg); }
.vue-switch span {
position: absolute;
font-size: 12px;
left: 25px;
color: #222; }
.vue-switch span.open {
display: none; }
.vue-switch span.close {
display: inline; }
.vue-switch::after {
position: absolute;
content: '';
width: 18px;
height: 18px;
border-radius: 18px;
background-color: #fff;
left: 1px;
top: 1px;
cursor: pointer;
-webkit-transition: left 0.23s ease, width 0.23s ease, background-color 0.23s ease;
transition: left 0.23s ease, width 0.23s ease, background-color 0.23s ease; }
.vue-switch:active::after {
width: 22px; }
.vue-switch.z-on {
background-color: #d33;
border-color: #d33; }
.vue-switch.z-on.c-blue {
background-color: #3091f2;
border-color: #3091f2; }
.vue-switch.z-on.c-orange {
background-color: #f60;
border-color: #f60; }
.vue-switch.z-on.c-green {
background-color: #0c6;
border-color: #0c6; }
.vue-switch.z-on span {
color: #fff;
left: 10px; }
.vue-switch.z-on span.open {
display: inline; }
.vue-switch.z-on span.close {
display: none; }
.vue-switch.z-on:active::after {
left: 25px; }
.vue-switch.z-on::after {
left: 29px; }
.vue-switch.s-lg {
width: 60px; }
.vue-switch.s-lg.z-on:active::after {
left: 37px; }
.vue-switch.s-lg.z-on::after {
left: 41px; }
.vue-switch.s-sm {
width: 36px;
height: 10px;
overflow: visible; }
.vue-switch.s-sm span {
display: none; }
.vue-switch.s-sm::after {
width: 18px;
height: 18px;
top: -4px;
left: -1px;
-webkit-box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.17);
box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.17); }
.vue-switch.s-sm:active::after {
width: 21px; }
.vue-switch.s-sm.z-disabled {
background-color: #e5e5e5;
border-color: #e5e5e5;
cursor: not-allowed; }
.vue-switch.s-sm.z-disabled::after {
background-color: #d5d5d5;
-webkit-box-shadow: none;
box-shadow: none;
cursor: not-allowed; }
.vue-switch.s-sm.z-on {
background-color: #fae2e2;
border-color: #fae2e2; }
.vue-switch.s-sm.z-on.c-blue {
background-color: #cae3fc;
border-color: #cae3fc; }
.vue-switch.s-sm.z-on.c-blue::after {
background-color: #3091f2; }
.vue-switch.s-sm.z-on.c-orange {
background-color: #ffc299;
border-color: #ffc299; }
.vue-switch.s-sm.z-on.c-orange::after {
background-color: #f60; }
.vue-switch.s-sm.z-on.c-green {
background-color: #b3ffd9;
border-color: #b3ffd9; }
.vue-switch.s-sm.z-on.c-green::after {
background-color: #0c6; }
.vue-switch.s-sm.z-on span {
display: none; }
.vue-switch.s-sm.z-on:active::after {
left: 15px; }
.vue-switch.s-sm.z-on::after {
left: 19px;
background-color: #d33; }
.vue-switch.s-sm.z-on.z-disabled::after {
-webkit-box-shadow: none;
box-shadow: none; }