CoreFiles by mySites.guru
_switcher.scss98 lines, 1,994 bytes, from Joomla_4.0.0-alpha2-Alpha-Full_Package.zip
Raw History Compare with 3.10.0-alpha9
md5
29a5f788fe28b681aeb7ff9d8539aa29
sha1
ff3bfb739cfa503ed2b1f85790d3a6338f5385bb
sha256
e839f8983f330befcc94486a73804a002023b5cd4dac3cf1dd7d788198d80446
// Switcher

.js-switcher {
  position: relative;
  box-sizing: content-box;
  display: inline-block;
  width: 60px;
  height: 26px;
  margin-top: 2px;
  vertical-align: middle;
  cursor: pointer;
  user-select: none;
  background-color: darken($white-offset, 5%);
  background-clip: content-box;
  border: 1px solid rgba(0,0,0,.18);
  border-radius: $border-radius;
  box-shadow: 0 0 0 0 rgb(223,223,223) inset;
  transition: border .4s ease 0s, box-shadow .4s ease 0s;

  &.active {
    background-color: theme-color("success");
    border-color: theme-color("success");
    box-shadow: 0 0 0 16px theme-color("success") inset;
    transition: border .4s ease 0s, box-shadow .4s ease 0s, background-color 1.2s ease 0s;
  }

  &.switcher-danger.active {
    background-color: theme-color("danger");
    border-color: theme-color("danger");
    box-shadow: 0 0 0 16px theme-color("danger") inset;
  }

  &.switcher-primary.active {
    background-color: theme-color("primary");
    border-color: theme-color("primary");
    box-shadow: 0 0 0 16px theme-color("primary") inset;
  }

  input {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    width: 60px;
    height: 26px;
    padding: 0;
    margin: 0;
    cursor: pointer;
    opacity: 0;
  }

  .switch {
    position: absolute;
    top: 0;
    width: 30px;
    height: 26px;
    background: $white-offset;
    border-radius: $border-radius;
    box-shadow: 0 0 1px rgba(0,0,0,.1) inset, 0 1px 3px rgba(0,0,0,.15);
    transition: left .2s ease 0s;
  }

  input:checked~.switch {
    left: 0;
  }

  input~:checked~.switch {
    left: 30px;
  }

  input:checked {
    z-index: 0;
  }

}

.switcher-labels {
  position: relative;
  margin-left: 10px;

  span {
    position: absolute;
    top: 0;
    left: 0;
    color: $gray-400;
    visibility: hidden;
    opacity: 0;
    transition: all .2s ease-in-out;

    &.active {
      visibility: visible;
      opacity: 1;
      transition: all .2s ease-in-out;
    }

  }

}

No other release has this exact content. See every version of this file.