openreplay/frontend/app/components/ui/Toggler/toggler.module.css
2023-01-18 15:06:55 +01:00

97 lines
1.7 KiB
CSS

.switch {
position: relative;
display: inline-block;
width: 35px;
height: 16px;
}
.label {
display: flex;
align-items: center;
cursor: pointer;
& span {
padding-left: 10px;
/* color: $gray-dark; */
}
}
.switch input {
display:none;
}
.slider {
position: absolute;
cursor: pointer;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: #ccc !important; /* postss reset is bad */
transition: .4s;
border-radius: 34px !important;
}
.slider:before {
position: absolute;
content: "";
height: 20px;
width: 20px;
left: 0;
bottom: -2px;
transition: .4s;
border-radius: 50%;
background: $gray-medium;
box-shadow: 0px 2px 1px -1px rgba(0, 0, 0, 0.2), 0px 1px 1px rgba(0, 0, 0, 0.14), 0px 1px 3px rgba(0, 0, 0, 0.12);
}
.slider.checked {
/* background-color: $teal !important; */
background-color: #b2bcff !important;
}
.slider.checked:before {
border: solid 1px $teal;
background-color: $teal !important;
transform: translateX(15px);
}
.slider.checked:before {
/* transform: translateX(15px); */
}
.switchPlain {
position: relative;
display: inline-block;
width: 25px;
height: 12px;
}
.switchPlain input {
display:none;
}
.sliderPlain {
position: absolute;
cursor: pointer;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: #ccc !important; /* postss reset is bad */
transition: .4s;
border-radius: 34px !important;
}
.sliderPlain:before {
position: absolute;
content: "";
height: 10px;
width: 10px;
left: 2px;
bottom: 1px;
background: white;
transition: .4s;
border-radius: 50%;
}
.sliderPlain.checked:before {
transform: translateX(11px);
background: $teal;
}