Sha256: f42854ec32686a56bc8f7dd0a9e90fc82960163b9f8d86829431836c6075c724

Contents?: true

Size: 1.44 KB

Versions: 1

Compression:

Stored size: 1.44 KB

Contents

@mixin switch-size($width, $height, $font-size, $handle-margin) {
  width: $width;
  height: $height;

  .switch-slider {
    font-size: $font-size;

    &::before {
      width: $height - ($handle-margin * 2) - ($border-width * 2);
      height: $height - ($handle-margin * 2) - ($border-width * 2);
    }
    &::after {
      font-size: $font-size;
    }
  }

  .switch-input:checked ~ .switch-slider {
    &::before {
      transform: translateX($width - $height);
    }
  }
}

@mixin switch-3d-size($width, $height) {
  width: $width;
  height: $height;

  .switch-slider::before {
    width: $height;
    height: $height;
  }

  .switch-input:checked ~ .switch-slider {
    &::before {
      transform: translateX($width - $height);
    }
  }
}

@mixin switch-variant($color) {
  .switch-input:checked + .switch-slider {
    background-color: $color;
    border-color: darken($color, 10%);

    &::before {
      border-color: darken($color, 10%);
    }
  }
}

@mixin switch-outline-variant($color) {
  .switch-input:checked + .switch-slider {
    background-color: #fff;
    border-color: $color;

    &::before {
      border-color: $color;
    }
    &::after {
      color: $color;
    }
  }
}

@mixin switch-outline-variant-alt($color) {
  .switch-input:checked + .switch-slider {
    background-color: #fff;
    border-color: $color;

    &::before {
      background-color: $color;
      border-color: $color;
    }
    &::after {
      color: $color;
    }
  }
}

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
anchor_ui-sprockets-5.2.0.1 app/assets/stylesheets/coreui/mixins/_switches.scss