Files
PreMiD/Extension/css/inputs.css
2018-11-01 19:53:24 +01:00

79 lines
1.2 KiB
CSS

/* The switch - the box around the slider */
.switch {
position: relative;
display: inline-block;
width: 35px;
height: 15px;
}
/* Hide default HTML checkbox */
.switch input {
display: none;
}
/* The slider */
.slider {
position: absolute;
cursor: pointer;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: rgb(255, 75, 75);
-webkit-transition: 0.25s;
transition: 0.25s;
}
.slider:before {
position: absolute;
content: "";
height: 17px;
width: 17px;
left: -2.5px;
top: -2.5px;
background-color: white;
-webkit-transition: 0.25s;
transition: 0.25s cubic-bezier(0.215, 0.61, 0.355, 1);
border: 1px solid lightgray;
}
input:checked + .slider {
background-color: rgb(75, 255, 75);
}
input:disabled + .slider {
background-color: rgb(255, 75, 75);
cursor: not-allowed;
}
input:disabled + .slider:before {
background-color: rgb(255, 75, 75);
border: 1px solid rgb(255, 75, 75);
cursor: not-allowed;
}
input:focus + .slider {
box-shadow: 0 0 1px rgb(75, 255, 75);
}
input:hover + .slider {
transform: scale(1.1);
}
input:checked + .slider:before {
transform: translateX(20px);
}
/* Rounded sliders */
.slider.round {
border-radius: 34px;
}
.slider.round:before {
border-radius: 50%;
}