bionictoggle
Version:
Bionic toggle to enable/disable bionic reading in your blogs
51 lines (43 loc) • 742 B
CSS
button {
border: 0;
border-radius: 50px;
cursor: pointer;
height: 25px;
position: relative;
width: 50px;
-webkit-appearance: none;
-moz-appearance: none;
}
button:hover {
background-color: lightgray;
}
button:focus,
button:active {
outline: none;
}
button::-moz-focus-inner {
border: 0;
}
.pin {
display: flex;
align-items: center;
justify-content: center;
font-weight: 600;
background-color: white;
border-radius: 98px;
height: 19px;
left: 2px;
position: absolute;
top: 3px;
width: 18px;
transition: left ease 0.5s;
}
button.on {
background-color: #404043;
}
button.off {
background-color: #e0e0e0;
}
button.on .pin {
left: 30px;
}