@mixin clearfix {
  &:after {
    content: "";
    display: table;
    clear: both;
  }
}

@mixin relative {
  position: relative;
  width: 100%;
  height: 100%;
}

@mixin pct($pct) {
  width: #{$pct};
  position: relative;
  margin: 0 auto;
}

@mixin triangle($width, $height, $color, $direction) {
  $width: $width/2;
  $color-border-style: $height solid $color;
  $transparent-border-style: $width solid transparent;
  height: 0;
  width: 0;
  @if $direction==up {
    border-bottom: $color-border-style;
    border-left: $transparent-border-style;
    border-right: $transparent-border-style;
  }
  @else if $direction==right {
    border-left: $color-border-style;
    border-top: $transparent-border-style;
    border-bottom: $transparent-border-style;
  }
  @else if $direction==down {
    border-top: $color-border-style;
    border-left: $transparent-border-style;
    border-right: $transparent-border-style;
  }
  @else if $direction==left {
    border-right: $color-border-style;
    border-top: $transparent-border-style;
    border-bottom: $transparent-border-style;
  }
}

@mixin flex-row($justify: flex-start, $align: stretch) {
  display: flex;
  @if $justify != flex-start {
    justify-content: $justify;
  }
  @if $align != stretch {
    align-items: $align;
  }
}

@mixin variant($color, $background-color, $border-color) {
  color: $color;
  background-color: $background-color;
  border-color: $border-color;
}

@mixin el-button--ghost {
  border-color: var(--el-color-primary);
  background-color: transparent;
  color: var(--el-color-primary);
  &:hover,
  &:focus {
    border-color: var(--el-color-primary-light-2);
    color: var(--el-color-primary-light-2);
  }
  &:active {
    border-color: var(--el-color-primary-active);
    color: var(--el-color-primary-active);
  }
}