<input id="check" type="checkbox" /> <label class="switch" for="check"> <svg viewBox="0 0 212.4992 84.4688" overflow="visible"> <path pathLength="360" fill="none" stroke="currentColor" d="M 42.2496 0 A 42.24 42.24 90 0 0 0 42.2496 A 42.24 42.24 90 0 0 42.2496 84.4688 A 42.24 42.24 90 0 0 84.4992 42.2496 A 42.24 42.24 90 0 0 42.2496 0 A 42.24 42.24 90 0 0 0 42.2496 A 42.24 42.24 90 0 0 42.2496 84.4688 L 170.2496 84.4688 A 42.24 42.24 90 0 0 212.4992 42.2496 A 42.24 42.24 90 0 0 170.2496 0 A 42.24 42.24 90 0 0 128 42.2496 A 42.24 42.24 90 0 0 170.2496 84.4688 A 42.24 42.24 90 0 0 212.4992 42.2496 A 42.24 42.24 90 0 0 170.2496 0 L 42.2496 0" ></path> </svg> </label>
.switch { --a: 0.5s ease-out; cursor: pointer; position: relative; display: inline-flex; height: 2em; border-radius: 2em; box-shadow: 0 0 0 0.66em #aaa; aspect-ratio: 212.4992/84.4688; background-color: #aaa; }