<label class="switch"> <input role="switch" type="checkbox" class="switch__input" /> <span class="switch__bg"></span> <span class="switch__label">Power</span> </label>
.switch, .switch__input { --hue: 223; --bg: hsl(var(--hue), 90%, 60%); --fg: hsl(var(--hue), 90%, 10%); --primary: hsl(var(--hue), 90%, 50%); --trans-dur: 0.3s; --trans-timing: cubic-bezier(0.65, 0, 0.35, 1); font-size: calc(40px + (80 - 40) * (100px - 320px) / (2560 - 320)); position: relative; -webkit-tap-highlight-color: transparent; }