@mixin a-background($background) {
  a {
    background: $background;
    &:active, &:hover {
      background: $background;
    }
  }
}

@mixin brand-logo($brand-logo-path, $width, $height, $scaled-height:"") {
  display: inline-block;
  vertical-align: middle;
  margin-right: 10px;
  background: url($brand-logo-path) no-repeat;
  background-size: contain;

  @if $scaled-height != "" {
    $scale: $scaled-height / $height;
    $width: $width * $scale;
    $height: $scaled-height;
  }

  width: $width;
  height: $height;
}

@mixin dark-background {
  color: $gray;
  background-color: $gray-d2;
}

@mixin disabled-link {
  &, &:hover, &:focus {
    color: $navbar-default-link-disabled-color;
    background-color: $navbar-default-link-disabled-bg;
  }
}

@mixin alert-container($alert-color) {
  padding: $padding-large-horizontal $padding-large-vertical;
  padding-bottom: $padding-large-horizontal * 2;
  margin-bottom: $padding-large-horizontal * 2;
  background-color: $alert-background-color;
  border-top: 4px solid $alert-color;

  i.alert {
    color: $alert-color;
    font-size: $font-size-large * 2;
    padding: 0;
  }

  .short-message {
    font-size: $font-size-large;
    font-weight: 700;
    padding-bottom: $padding-small-horizontal;
  }

  // this keeps the gray borders from touching the top band at a 45 degree angle
  &:before {
    border: $description-border;
    border-top: none;
    content: "";
    position: absolute;
    bottom: 0;
    top: 0;
    left: 0;
    right: 0;
  }
}
