Skip to content
Snippets Groups Projects
_buttons.scss 1.4 KiB
Newer Older
@mixin button-std($bg: $red, $color: $white) {
  background-color: $bg;
  color: $color;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  text-transform: uppercase;
  text-decoration: none;
  padding: 11px 16px 10px;
  margin-bottom: 16px;
  display: inline-block;
  position: relative;
  cursor: pointer;

  &:active {
    background-color: darken($bg, 5%) !important;
  }

  &:hover {
    background-color: lighten($bg, 3%);
  }

  &:focus {
    background-color: lighten($bg, 3%);
M Miller's avatar
M Miller committed
    outline: 2px dotted $near-black;
    outline-offset: 0;
  }
}

@mixin button-rev($bg: $white, $color: $red) {
  background-color: $bg;
  color: $color;
  border: 1px solid $color;
  padding: 11px 16px 10px;

  &:active {
    background-color: darken($color, 5%) !important;
  }

  &:hover {
    background-color: $color;
  }
  &:focus {
    background-color: $color;
  }
}

@mixin button-gray {
  @include button-std($gray);
}

@mixin button-teal {
  @include button-std($teal);
}

@mixin button-alt-teal {
  @include button-rev($white, $teal);
}

@mixin button-alt-gray {
  @include button-rev($white, $gray);
}

.button {
  @include button-std;

  &--gray {
    @include button-gray;
  }

  &--teal {
    @include button-teal;
  }

  &--alt {
    @include button-rev;
  }

  &--alt-gray {
    @include button-alt-gray;
  }

  &--alt-teal {
    @include button-alt-teal;
  }
}

.more-link {
  @include button;
}