@mixin bitmap-border($border-url, $image-slice, $image-width, $border-radius) {
  border-image: $border-url !important;
  border-image-slice: $image-slice !important;
  border-image-width: $image-width !important;
  border-image-outset: 0 !important;
  border-image-repeat: stretch !important;
  border-radius: $border-radius !important;
}

@mixin bitmap-border-2px($border-url) {
  @include bitmap-border($border-url, 2, 2px, 0);
}

@mixin tooltip {
  @include bitmap-border($url-tooltip-border, 8, 8px, 12px);
  background-color: $color-tooltip !important;
  color: $color-text !important;
  font-size: inherit !important;
}

@mixin tooltip-tail {
  background: $url-tooltip-tail no-repeat !important;
  height: 17px !important;
  width: 10px !important;
  border-bottom: none !important;
  border-top: none !important;
  border-left: none !important;
  border-right: none !important;
}

@mixin window-border {
  @include bitmap-border-2px($url-window-border);
}

@mixin window {
  @include window-border;
  background-color: $color-window-background !important;
}

@mixin window-header {
  background: linear-gradient(to right, $color-header-left, $color-header-right);
  color: $color-header-text !important;
  border-radius: 0;
}

@mixin input-border {
  @include bitmap-border-2px($url-input-border);
}

@mixin input {
  @include input-border;
  background-color: $color-input-background !important;
  box-shadow: none !important;
}

@mixin button-border {
  @include bitmap-border-2px($url-button-border);
}

@mixin button-pushed-border {
  @include bitmap-border-2px($url-button-pushed-border);
}

@mixin button {
  background-color: $color-window-background !important;
  color: $color-text !important;
  background-image: none !important;
  text-decoration: none;
}

@mixin button-pushed {
  background-image: $url-button-selected-background !important;
  background-repeat: repeat;
  background-size: 2px 2px;
  color: $color-text !important;
  text-decoration: none;
  font-weight: bold;
}

@mixin toolbar-border {
  @include bitmap-border-2px($url-toolbar-border);
}

@mixin toolbar {
  @include toolbar-border;
  background-color: $color-window-background !important;
}

@mixin toolbar-grip {
  background: $url-toolbar-grip;
}

@mixin statusbar {
  border: 1px solid;
  border-top-color: #82838a;
  border-left-color: #82838a;
  border-bottom-color: #ffffff;
  border-right-color: #ffffff;
}

@mixin statusbar-grip {
  background-image: $url-statusbar-grip;
  background-repeat: no-repeat;
  background-position: 100% 100%;
}

@mixin octicon-replace($url, $w, $h) {
  background: $url;
  width: $w;
  height: $h;
  color: transparent !important;
  vertical-align: baseline !important;
}

@mixin border-bottom-separator {
  border-bottom: 1px solid $color-border-dark !important;
  box-shadow: 0px 1px 0px 0px $color-border-light;
}

@mixin border-top-separator {
  border-top: 1px solid $color-border-light !important;
  box-shadow: 0px -1px 0px 0px $color-border-dark;
}

@mixin border-right-separator {
  border-right: 1px solid $color-border-dark !important;
  box-shadow: 1px 0px 0px 0px $color-border-light;
}

@mixin border-left-separator {
  border-left: 1px solid $color-border-dark !important;
  box-shadow: -1px 0px 0px 0px $color-border-light;
}

@mixin m-0 {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

@mixin reset-text-styles {
  font-weight: normal !important;
  font-size: 14px !important;
  opacity: 1 !important;
  text-decoration: none !important;
  color: $color-text !important;
}

@mixin text-disabled {
  font-weight: normal !important;
  font-size: 14px !important;
  opacity: 1 !important;
  text-decoration: none !important;
  color: $color-text-disabled !important;
  text-shadow: 1px 1px $color-text-disabled-shadow;
}

@mixin reset-borders {
  box-shadow: none;
  outline: none !important;
  border-top-width: 0 !important;
  border-bottom-width: 0 !important;
  border-left-width: 0 !important;
  border-right-width: 0 !important;
}

@mixin hotkey {
  &::first-letter {
    text-decoration: underline;
  }
}
