/
toggle-switch-812-rtl.css
385 lines (326 loc) · 8.34 KB
/
toggle-switch-812-rtl.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
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
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
@charset "UTF-8";
/*
* Styles from the toggle switch library.
*/
/*
* CSS TOGGLE SWITCH
*
* Ionuț Colceriu - ghinda.net
* https://github.com/ghinda/css-toggle-switch
*
*/
/* Hide by default. */
.switch-toggle a,
.switch-light span span {
display: none;
}
/* Only target browsers with support for media queries. */
@media only screen {
.switch-light,
.switch-toggle {
display: block;
position: relative;
padding: 0 !important;
}
.switch-light::after,
.switch-toggle::after {
display: table;
clear: both;
content: "";
}
.switch-light *,
.switch-light *:before,
.switch-light *:after,
.switch-toggle *,
.switch-toggle *:before,
.switch-toggle *:after {
box-sizing: border-box;
}
.switch-light a,
.switch-toggle a {
display: block;
transition: all 0.2s ease-out;
}
.switch-light label,
.switch-light > span,
.switch-toggle label,
.switch-toggle > span,
.switch-light-visual-label {
line-height: 2;
vertical-align: middle;
}
.switch-light input {
position: absolute;
z-index: 3;
opacity: 0;
}
.switch-light input:checked ~ span a {
left: 0;
}
/* Inherit from label. */
.switch-light strong {
font-weight: inherit;
}
.switch-light > span {
position: relative;
min-height: 2em;
padding: 0;
text-align: right;
}
.switch-light span span {
display: block;
float: right;
position: relative;
z-index: 2;
width: 50%;
text-align: center;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.switch-light a {
display: block;
position: absolute;
z-index: 1;
top: 0;
left: 50%;
width: 50%;
height: 100%;
padding: 0;
}
.switch-toggle input {
position: absolute;
right: 0;
opacity: 0;
}
.switch-toggle input + label {
display: block;
float: right;
position: relative;
z-index: 2;
margin: 0;
padding: 0 0.5em;
text-align: center;
}
.switch-toggle a {
position: absolute;
z-index: 1;
top: 0;
right: 0;
width: 10px;
height: 100%;
padding: 0;
}
.switch-toggle label:nth-child(2):nth-last-child(4),
.switch-toggle label:nth-child(2):nth-last-child(4) ~ label,
.switch-toggle label:nth-child(2):nth-last-child(4) ~ a {
width: 50%;
}
.switch-toggle label:nth-child(2):nth-last-child(4) ~ input:checked:nth-child(3) + label ~ a {
right: 50%;
}
.switch-toggle label:nth-child(2):nth-last-child(6),
.switch-toggle label:nth-child(2):nth-last-child(6) ~ label,
.switch-toggle label:nth-child(2):nth-last-child(6) ~ a {
width: 33.33%;
}
.switch-toggle label:nth-child(2):nth-last-child(6) ~ input:checked:nth-child(3) + label ~ a {
right: 33.33%;
}
.switch-toggle label:nth-child(2):nth-last-child(6) ~ input:checked:nth-child(5) + label ~ a {
right: 66.66%;
}
.switch-toggle label:nth-child(2):nth-last-child(8),
.switch-toggle label:nth-child(2):nth-last-child(8) ~ label,
.switch-toggle label:nth-child(2):nth-last-child(8) ~ a {
width: 25%;
}
.switch-toggle label:nth-child(2):nth-last-child(8) ~ input:checked:nth-child(3) + label ~ a {
right: 25%;
}
.switch-toggle label:nth-child(2):nth-last-child(8) ~ input:checked:nth-child(5) + label ~ a {
right: 50%;
}
.switch-toggle label:nth-child(2):nth-last-child(8) ~ input:checked:nth-child(7) + label ~ a {
right: 75%;
}
.switch-toggle label:nth-child(2):nth-last-child(10),
.switch-toggle label:nth-child(2):nth-last-child(10) ~ label,
.switch-toggle label:nth-child(2):nth-last-child(10) ~ a {
width: 20%;
}
.switch-toggle label:nth-child(2):nth-last-child(10) ~ input:checked:nth-child(3) + label ~ a {
right: 20%;
}
.switch-toggle label:nth-child(2):nth-last-child(10) ~ input:checked:nth-child(5) + label ~ a {
right: 40%;
}
.switch-toggle label:nth-child(2):nth-last-child(10) ~ input:checked:nth-child(7) + label ~ a {
right: 60%;
}
.switch-toggle label:nth-child(2):nth-last-child(10) ~ input:checked:nth-child(9) + label ~ a {
right: 80%;
}
.switch-toggle label:nth-child(2):nth-last-child(12),
.switch-toggle label:nth-child(2):nth-last-child(12) ~ label,
.switch-toggle label:nth-child(2):nth-last-child(12) ~ a {
width: 16.6%;
}
.switch-toggle label:nth-child(2):nth-last-child(12) ~ input:checked:nth-child(3) + label ~ a {
right: 16.6%;
}
.switch-toggle label:nth-child(2):nth-last-child(12) ~ input:checked:nth-child(5) + label ~ a {
right: 33.2%;
}
.switch-toggle label:nth-child(2):nth-last-child(12) ~ input:checked:nth-child(7) + label ~ a {
right: 49.8%;
}
.switch-toggle label:nth-child(2):nth-last-child(12) ~ input:checked:nth-child(9) + label ~ a {
right: 66.4%;
}
.switch-toggle label:nth-child(2):nth-last-child(12) ~ input:checked:nth-child(11) + label ~ a {
right: 83%;
}
.switch-candy a {
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2), inset 0 1px 1px rgba(255, 255, 255, 0.45);
}
}
/*
* Bugfix for older Webkit, including mobile Webkit. Adapted from
* http://css-tricks.com/webkit-sibling-bug/
*/
@media only screen and (-webkit-max-device-pixel-ratio: 2) and (max-device-width: 80em) {
.switch-light,
.switch-toggle {
-webkit-animation: webkitSiblingBugfix infinite 1s;
}
}
/*
* Custom styles.
*/
.fieldset-switch-toggle label {
float: none;
}
@media only screen {
.fieldset-switch-toggle legend {
float: right;
box-sizing: border-box;
min-width: 200px;
margin: 8px 0;
padding-left: 16px;
line-height: 2;
vertical-align: middle;
}
.switch-container__has-help legend,
.switch-container__has-help .switch-light-visual-label {
float: right;
min-width: 0;
padding-left: 0;
}
.switch-container__has-help .yoast_help.yoast-help-button {
margin: 8px 4px 0 0;
}
.switch-toggle.switch-yoast-seo,
.switch-light.switch-yoast-seo > span {
width: 250px;
border: 1px solid #ccc;
border-radius: 0.5em;
background-color: #dcdcdc;
box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15);
}
.switch-toggle.switch-yoast-seo,
.switch-light.switch-yoast-seo {
float: right;
clear: both;
}
.switch-light.switch-yoast-seo > span {
/* To contain floats instead of the original overflow: hidden;. */
display: inline-block;
/* To make the focus style fully visible. */
overflow: visible;
}
.switch-toggle.switch-yoast-seo a,
.switch-light.switch-yoast-seo a {
border: 1px solid #b5b5b5;
border-radius: 0.5em;
background: #a4286a;
}
.switch-toggle.switch-yoast-seo input:focus ~ span a,
.switch-light.switch-yoast-seo input:focus ~ span a,
.switch-toggle.switch-yoast-seo input:focus + label,
.switch-light.switch-yoast-seo input:focus + label {
/* Reset focus style. */
outline: none;
}
.switch-toggle.switch-yoast-seo input:focus ~ a,
.switch-light.switch-yoast-seo input:focus ~ span a {
border-color: #5b9dd9 !important;
box-shadow: 0 0 2px rgba(0, 115, 170, 0.8) !important;
}
.switch-toggle.switch-yoast-seo input:checked ~ span a,
.switch-light.switch-yoast-seo input:checked ~ span a {
border: 1px solid #b5b5b5;
background: #a4286a;
}
.switch-light.switch-yoast-seo span span,
.switch-light.switch-yoast-seo input:checked ~ span span:first-child,
.switch-toggle.switch-yoast-seo label {
color: #333;
text-shadow: none;
font-weight: inherit;
}
.switch-candy.switch-yoast-seo input ~ span span:first-child,
.switch-candy.switch-yoast-seo input:checked ~ span span:nth-child(2),
.switch-candy.switch-yoast-seo input:checked + label {
color: #fff;
text-shadow: none;
}
.switch-light.switch-yoast-seo-reverse input:checked ~ span a {
right: 0;
}
.switch-light.switch-yoast-seo-reverse a {
right: 50%;
}
.switch-light.switch-yoast-seo-reverse span span {
float: left;
}
.switch-toggle.switch-yoast-seo label,
label.switch-light.switch-yoast-seo {
margin-right: 0;
/*
* To help old iOS: ensure labels have cursor pointer instead of
* using the empty onclick hack.
*/
cursor: pointer;
}
.switch-yoast-seo .switch-yoast-seo-jaws-a11y {
/* IE11 and JAWS 17.0 need this hack. */
display: block;
overflow: hidden;
height: 1px;
margin-bottom: -1px;
}
.switch-toggle.switch-yoast-seo label code,
.switch-light.switch-yoast-seo label code {
background-color: inherit;
vertical-align: top;
}
.switch-container .label-text,
.switch-light-visual-label {
display: block;
margin: 8px 0;
font-weight: 400;
line-height: 2;
}
.switch-container {
clear: both;
margin: 0 0 0.8em 0;
}
.switch-container + .switch-container {
margin-top: 8px;
}
.switch-container + p {
margin: -8px 0 16px 0;
}
}