index.css
3.93 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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
/* stylelint-disable at-rule-empty-line-before,at-rule-name-space-after,at-rule-no-unknown */
/* stylelint-disable no-duplicate-selectors */
/* stylelint-disable */
/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */
.ant-switch {
margin: 0;
padding: 0;
color: rgba(0, 0, 0, 0.85);
font-size: 14px;
font-variant: tabular-nums;
line-height: 1.5715;
list-style: none;
-webkit-font-feature-settings: 'tnum';
font-feature-settings: 'tnum';
position: relative;
display: inline-block;
-webkit-box-sizing: border-box;
box-sizing: border-box;
min-width: 44px;
height: 22px;
line-height: 22px;
vertical-align: middle;
background-color: rgba(0, 0, 0, 0.25);
border: 0;
border-radius: 100px;
cursor: pointer;
-webkit-transition: all 0.2s;
transition: all 0.2s;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.ant-switch:focus {
outline: 0;
-webkit-box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
}
.ant-switch-checked:focus {
-webkit-box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}
.ant-switch:focus:hover {
-webkit-box-shadow: none;
box-shadow: none;
}
.ant-switch-checked {
background-color: #1890ff;
}
.ant-switch-loading,
.ant-switch-disabled {
cursor: not-allowed;
opacity: 0.4;
}
.ant-switch-loading *,
.ant-switch-disabled * {
-webkit-box-shadow: none;
box-shadow: none;
cursor: not-allowed;
}
.ant-switch-inner {
display: block;
margin: 0 7px 0 25px;
color: #fff;
font-size: 12px;
-webkit-transition: margin 0.2s;
transition: margin 0.2s;
}
.ant-switch-checked .ant-switch-inner {
margin: 0 25px 0 7px;
}
.ant-switch-handle {
position: absolute;
top: 2px;
left: 2px;
width: 18px;
height: 18px;
-webkit-transition: all 0.2s ease-in-out;
transition: all 0.2s ease-in-out;
}
.ant-switch-handle::before {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
background-color: #fff;
border-radius: 9px;
-webkit-box-shadow: 0 2px 4px 0 rgba(0, 35, 11, 0.2);
box-shadow: 0 2px 4px 0 rgba(0, 35, 11, 0.2);
-webkit-transition: all 0.2s ease-in-out;
transition: all 0.2s ease-in-out;
content: '';
}
.ant-switch-checked .ant-switch-handle {
left: calc(100% - 18px - 2px);
}
.ant-switch:not(.ant-switch-disabled):active .ant-switch-handle::before {
right: -30%;
left: 0;
}
.ant-switch:not(.ant-switch-disabled):active.ant-switch-checked .ant-switch-handle::before {
right: 0;
left: -30%;
}
.ant-switch-loading-icon {
position: relative;
top: 2px;
color: rgba(0, 0, 0, 0.65);
vertical-align: top;
}
.ant-switch-checked .ant-switch-loading-icon {
color: #1890ff;
}
.ant-switch-small {
min-width: 28px;
height: 16px;
line-height: 16px;
}
.ant-switch-small .ant-switch-inner {
margin: 0 5px 0 18px;
font-size: 12px;
}
.ant-switch-small .ant-switch-handle {
width: 12px;
height: 12px;
}
.ant-switch-small .ant-switch-loading-icon {
top: 1.5px;
font-size: 9px;
}
.ant-switch-small.ant-switch-checked .ant-switch-inner {
margin: 0 18px 0 5px;
}
.ant-switch-small.ant-switch-checked .ant-switch-handle {
left: calc(100% - 12px - 2px);
}
.ant-switch-rtl {
direction: rtl;
}
.ant-switch-rtl .ant-switch-inner {
margin: 0 25px 0 7px;
}
.ant-switch-rtl .ant-switch-handle {
right: 2px;
left: auto;
}
.ant-switch-rtl:not(.ant-switch-rtl-disabled):active .ant-switch-handle::before {
right: 0;
left: -30%;
}
.ant-switch-rtl:not(.ant-switch-rtl-disabled):active.ant-switch-checked .ant-switch-handle::before {
right: -30%;
left: 0;
}
.ant-switch-rtl.ant-switch-checked .ant-switch-inner {
margin: 0 7px 0 25px;
}
.ant-switch-rtl.ant-switch-checked .ant-switch-handle {
right: calc(100% - 18px - 2px);
}
.ant-switch-rtl.ant-switch-small.ant-switch-checked .ant-switch-handle {
right: calc(100% - 12px - 2px);
}