 

html[data-theme=dark] {
  --bg: #333333;
  --bg-panel: #434343;
  --color-headings: #3694FF;
  --color-text: #fff;
}

.container {
  background-color: var(--bg-panel);
} 

input[type=checkbox] {
  height: 0;
  width: 0;
  visibility: hidden;
}

label {
  top:12px;
  cursor: pointer;
  text-indent: -9999px;
  width: 36px;
  height: 17px;
  background: grey;
  float: right;
  border-radius: 100px;
  position: relative;
}

label:after {
  content: "";
  position: absolute;
  top: 1px;
  bottom:1px;
  left: 2px;
  width: 15px;
  height: 15px;
  background: #fff;
  border-radius: 90px;
  transition: 0.3s;
}

input:checked + label {
  background: var(--color-headings);
}

input:checked + label:after {
  left: calc(100% - 5px);
  transform: translateX(-100%);
}

label:active:after {
  width: 45px;
}

html.transition,
html.transition *,
html.transition *:before,
html.transition *:after {
  transition: all 750ms !important;
  transition-delay: 0 !important;
}