mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-12-12 00:31:11 -05:00
48 lines
779 B
SCSS
48 lines
779 B
SCSS
@import "../../colors";
|
|
|
|
.toggle-switch {
|
|
position: relative;
|
|
display: inline-block;
|
|
width: 38px;
|
|
height: 24px;
|
|
top: -.125rem;
|
|
margin-left: .625rem;
|
|
}
|
|
|
|
.toggle-switch input {
|
|
opacity: 0;
|
|
width: 0;
|
|
height: 0;
|
|
}
|
|
|
|
.toggle-switch .slider {
|
|
position: absolute;
|
|
cursor: pointer;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
background-color: $ui-dark-gray;
|
|
border-radius: 12px;
|
|
transition: .4s;
|
|
}
|
|
|
|
.toggle-switch .slider:before {
|
|
position: absolute;
|
|
content: "";
|
|
height: 18px;
|
|
width: 18px;
|
|
left: 3px;
|
|
bottom: 3px;
|
|
background-color: $ui-white;
|
|
border-radius: 50%;
|
|
transition: .4s;
|
|
}
|
|
|
|
.toggle-switch input:checked + .slider {
|
|
background-color: $ui-aqua;
|
|
}
|
|
|
|
.toggle-switch input:checked + .slider:before {
|
|
transform: translateX(14px);
|
|
}
|