waveterm/frontend/app/element/toggle.less
Red J Adaya 9233b3dbd7
modals component and model and TOS modal (#164)
Co-authored-by: Sylvia Crowe <software@oneirocosm.com>
Co-authored-by: sawka <mike.sawka@gmail.com>
2024-07-30 11:44:19 -07:00

62 lines
1.3 KiB
Plaintext

// Copyright 2024, Command Line Inc.
// SPDX-License-Identifier: Apache-2.0
.check-toggle-wrapper {
user-select: none;
display: flex;
height: 100%;
align-items: center;
justify-content: center;
.checkbox-toggle {
position: relative;
display: inline-block;
width: 32px;
height: 20px;
input {
opacity: 0;
width: 0;
height: 0;
}
.slider {
position: absolute;
cursor: pointer;
content: "";
top: 0;
bottom: 0;
left: 0;
right: 0;
background-color: var(--toggle-bg-color);
transition: 0.5s;
border-radius: 33px;
}
.slider:before {
position: absolute;
content: "";
height: 16px;
width: 16px;
left: 3px;
bottom: 2px;
background-color: var(--toggle-thumb-color);
transition: 0.5s;
border-radius: 50%;
}
input:checked + .slider {
background-color: var(--toggle-checked-bg-color);
}
input:checked + .slider:before {
transform: translateX(11px);
}
}
label {
cursor: pointer;
padding: 0 5px;
}
}