@import './variable';

@mixin absolute($width: 100%, $height: 100%) {
  position: absolute;
  width: $width;
  height: $height;
  left: 0;
  top: 0;
}

@mixin overflow-auto($direction: 'both') {
  @if $direction == 'both' {
    overflow: auto;
  } @else {
    overflow-#{$direction}: auto;
  }
  -webkit-overflow-scrolling: touch;
}

@mixin breadcrumb {
  background: var(--darker-background);
  color: var(--primary);
  user-select: text;
  margin-bottom: 10px;
  word-break: break-all;
  padding: $padding;
  font-size: $font-size-l;
  min-height: 40px;
  border-bottom: 1px solid var(--border);
}

@mixin clear-float {
  &:after {
    content: '';
    display: block;
    clear: both;
  }
}

@mixin right-btn {
  .btn {
    display: flex;
    margin-left: 5px;
    float: right;
    color: var(--primary);
    width: 18px;
    height: 18px;
    justify-content: center;
    align-items: center;
    font-size: $font-size-l;
    cursor: pointer;
    transition: color $anim-duration;
    &.search-keyword {
      width: auto;
      max-width: 80px;
      font-size: $font-size;
      overflow: hidden;
      text-overflow: ellipsis;
      display: inline-block;
    }
    &:active {
      color: var(--accent);
    }
  }
}
