Sha256: 13a5f5f6c66f5c9f4059e4d2fee388d88a437b4399380a49506f3ea298ab01d7

Contents?: true

Size: 1.71 KB

Versions: 1

Compression:

Stored size: 1.71 KB

Contents

@import "settings.global";
@import "objects.grid";

@mixin toggle {
  @include grid;
  @include grid--center;
  width: auto;
  user-select: none;
  cursor: pointer;
}

@mixin toggle__checkbox {
  display: none;
}

@mixin toggle__track--background-color($track-color: $toggle-track-background-color) {
  background-color: $track-color;
}

@mixin toggle__track {
  position: relative;
  @include grid__cell;
  @include grid__cell--width-fixed;
  width: 1em;
  height: 0.5em;
  margin: $toggle-margin;
  @include toggle__track--background-color;
  border-radius: $toggle-track-border-radius;
}

@mixin toggle__track--primary {
  @include toggle__track--background-color($toggle-track-primary-background-color);
}

@mixin toggle__track--secondary {
  @include toggle__track--background-color($toggle-track-secondary-background-color);
}

@mixin toggle__track--success {
  @include toggle__track--background-color($toggle-track-success-background-color);
}

@mixin toggle__track--error {
  @include toggle__track--background-color($toggle-track-error-background-color);
}

@mixin toggle__track--unchecked {
  background-color: $toggle-track-unchecked-background-color;
}

@mixin toggle__track--disabled {
  background-color: $toggle-track-disabled-background-color;
  cursor: not-allowed;
}

@mixin toggle__handle {
  position: absolute;
  top: -0.25em;
  left: 0;
  width: 1em;
  height: 1em;
  background-color: $toggle-handle-background-color;
  border-radius: $toggle-handle-border-radius;
  box-shadow: $toggle-handle-box-shadow;
  transform: translateX(100% );
}

@mixin toggle__handle--unchecked {
  transform: translateZ(0);
}

@mixin toggle__handle--disabled {
  background-color: $toggle-handle-disabled-background-color;
  cursor: not-allowed;
}

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
blaze-css-rails-0.0.1 app/assets/stylesheets/mixins/_components.toggles.scss