Skip to content

Commit 0f3207f

Browse files
authored
Update ultra.css
1 parent abfdb2d commit 0f3207f

File tree

1 file changed

+57
-0
lines changed

1 file changed

+57
-0
lines changed

dist/ultra.css

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
--chip-color: lightgrey;
1212
--chip-text-color: grey;
1313
--chip-hover-color: lightblue;
14+
15+
--switch-color: #2196f3;
1416
}
1517

1618
@keyframes fade-out {
@@ -338,3 +340,58 @@ div.ultra-chip img {
338340
from { opacity: 0; transform: translateY(-5px); }
339341
to { opacity: 1; transform: translateY(0); }
340342
}
343+
344+
.ultra-switch {
345+
position: relative;
346+
display: inline-block;
347+
width: 48px;
348+
height: 26px;
349+
}
350+
351+
.ultra-switch-input {
352+
opacity: 0;
353+
width: 0;
354+
height: 0;
355+
}
356+
357+
.ultra-switch-slider {
358+
position: absolute;
359+
cursor: pointer;
360+
top: 0;
361+
left: 0;
362+
right: 0;
363+
bottom: 0;
364+
background-color: #555;
365+
transition: 0.4s;
366+
border-radius: 34px;
367+
}
368+
369+
.ultra-switch-slider::before {
370+
position: absolute;
371+
content: "";
372+
height: 18px;
373+
width: 18px;
374+
left: 4px;
375+
bottom: 4px;
376+
background-color: white;
377+
transition: 0.4s;
378+
border-radius: 50%;
379+
}
380+
381+
.ultra-switch-input:checked + .ultra-switch-slider {
382+
background-color: var(--switch-color, #2196f3);
383+
}
384+
385+
.ultra-switch-input:checked + .ultra-switch-slider::before {
386+
transform: translateX(22px);
387+
}
388+
389+
.ultra-switch.ultra-disabled .ultra-switch-input {
390+
pointer-events: none;
391+
}
392+
393+
.ultra-switch.ultra-disabled .ultra-switch-slider {
394+
background-color: #333;
395+
cursor: not-allowed;
396+
opacity: 0.6;
397+
}

0 commit comments

Comments
 (0)