ldc-boutique-cnc/resources/sass/_forms.scss
2022-11-22 15:49:33 +01:00

58 lines
955 B
SCSS
Vendored

/* The switch - the box around the slider */
.switch {
position: relative;
display: inline-block;
width: 60px;
height: 34px;
/* Hide default HTML checkbox */
input {
width: 0;
height: 0;
opacity: 0;
}
}
/* The slider */
.slider {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
background-color: #ccc;
cursor: pointer;
transition: 0.4s;
&::before {
position: absolute;
bottom: 4px;
left: 4px;
width: 26px;
height: 26px;
background-color: #fff;
content: "";
transition: 0.4s;
}
}
input:checked + .slider {
background-color: #2196f3;
}
input:focus + .slider {
box-shadow: 0 0 1px #2196f3;
}
input:checked + .slider::before {
transform: translateX(26px);
}
/* Rounded sliders */
.slider.round {
border-radius: 34px;
}
.slider.round::before {
border-radius: 50%;
}