@bbc/react-transcript-editor
Version:
A React component to make transcribing audio and video easier and faster.
71 lines (61 loc) • 1.11 kB
CSS
@value color-labs-red from '../colours.module.css';
.switchContainer {
display: inline-block;
position: relative;
height: 48px;
width: 48px;
display:inline-block;
vertical-align:middle;
}
.label {
display: block;
margin: 0.2em 0;
font-weight: light;
color: white;
text-align: center;
font-size: 0.8em;
}
.switch {
position: relative;
display: inline-block;
width: 48px;
height: 28px;
}
.switch input {
opacity: 0;
width: 0;
height: 0;
}
.slider {
position: absolute;
cursor: pointer;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: #ccc;
-webkit-transition: .4s;
transition: .4s;
}
.slider:before {
position: absolute;
content: "";
height: 20px;
width: 20px;
left: 4px;
bottom: 4px;
background-color: white;
-webkit-transition: .4s;
transition: .4s;
}
input:checked + .slider {
background-color: color-labs-red;
}
input:focus + .slider {
box-shadow: 0 0 1px color-labs-red;
}
input:checked + .slider:before {
-webkit-transform: translateX(20px);
-ms-transform: translateX(20px);
transform: translateX(20px);
}