All Downloads are FREE. Search and download functionalities are using the official Maven repository.

dotty_res.styles.theme.components.switch.css Maven / Gradle / Ivy

There is a newer version: 3.6.0-RC1-bin-20240917-6e852d2-NIGHTLY
Show newest version
.switch {
  position: relative;
  display: inline-block;
  width: calc(4 * var(--base-spacing));
  height: calc(calc(2 * var(--base-spacing)) + 2px);
  margin: var(--base-spacing);
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--switch-background-default);
  -webkit-transition: .4s;
  transition: .4s;
  border-radius: calc(calc(4 * var(--base-spacing)) + 2px);
}

.slider:before {
  position: absolute;
  content: "";
  height: calc(2 * var(--base-spacing));
  width: calc(2 * var(--base-spacing));
  left: 1px;
  bottom: 1px;
  background-color: var(--switch-button);
  -webkit-transition: .4s;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--switch-background-selected);
}

input:focus + .slider {
  box-shadow: 0 0 1px var(--switch-background-selected);
}

input:checked + .slider:before {
  -webkit-transform: translateX(calc(calc(2 * var(--base-spacing)) - 2px));
  -ms-transform: translateX(calc(calc(2 * var(--base-spacing)) - 2px));
  transform: translateX(calc(calc(2 * var(--base-spacing)) - 2px));
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy