Register-Page-Bank-Sampah/assets/css/toggle.css

66 lines
1.1 KiB
CSS

.content {
display: flex;
flex-direction: column;
margin: auto;
text-align: center;
width: 80%;
transform: translateY(5%);
}
label.label,
.toggle {
height: 2rem;
border-radius: 100px;
}
label.label {
width: 100%;
background-color: rgba(0, 0, 0, 0.1);
border-radius: 100px;
position: relative;
cursor: pointer;
}
.toggle {
position: absolute;
width: 50%;
background-color: #fff;
box-shadow: 0 2px 15px rgba(0, 0, 0, 0.15);
transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.names {
font-size: 90%;
font-weight: bolder;
width: 80%;
height: 100%;
margin-left: 12%;
position: absolute;
display: flex;
align-items: center;
justify-content: space-between;
user-select: none;
}
.dark {
opacity: 0.5;
}
.dark,
.light {
margin: 0;
}
/* -------- Switch Styles ------------*/
.jenisAkun[type="checkbox"] {
display: none;
}
/* Toggle */
[type="checkbox"]:checked + .app .toggle {
transform: translateX(100%);
background-color: #fd7402;
}
[type="checkbox"]:checked + .app .dark {
opacity: 1;
color: #fff;
}
[type="checkbox"]:checked + .app .light {
opacity: 0.5;
}