// BEM命名辅助函数
@mixin setTopLine($c: #C7C7C7) {
  content: " ";
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  height: 1px;
  border-top: 1rpx solid $c;
  color: $c;
}

@mixin setBottomLine($c: #C7C7C7) {
  content: " ";
  position: absolute;
  left: 0;
  bottom: 0;
  right: 0;
  height: 1px;
  border-bottom: 1rpx solid $c;
  color: $c;
}

@mixin setLeftLine($c: #C7C7C7) {
  content: " ";
  position: absolute;
  left: 0;
  top: 0;
  width: 1px;
  bottom: 0;
  border-left: 1rpx solid $c;
  color: $c;
}

@mixin setRightLine($c: #C7C7C7) {
  content: " ";
  position: absolute;
  right: 0;
  top: 0;
  width: 1px;
  bottom: 0;
  border-right: 1rpx solid $c;
  color: $c;
}

@mixin setTapColor($c:rgba(0,0,0,0)) {
  -webkit-tap-highlight-color: $c;
}

@mixin _setArrow($arrowsize, $borderColor, $borderWidth){
  display: inline-block;
  height: $arrowsize;
  width: $arrowsize;
  border-width: $borderWidth $borderWidth 0 0;
  border-color: $borderColor;
  border-style: solid;
}

@mixin setArrow($direction, $arrowsize, $borderColor, $borderWidth) {
  @if $direction = 'top' {
    @include _setArrow($arrowsize, $borderColor, $borderWidth);
    transform: matrix(0.71,-0.71,0.71,0.71,0,0); // rotate(-45deg)
  }
  @if $direction = 'right' {
    @include _setArrow($arrowsize, $borderColor, $borderWidth);
    transform: matrix(0.71,0.71,-0.71,0.71,0,0); // rotate(45deg);
  
    position: relative;
    top: -2px;
  }
  @if $direction = 'down' {
    @include _setArrow($arrowsize, $borderColor, $borderWidth);
    transform: matrix(-0.71,0.71,-0.71,-0.71,0,0); // rotate(135deg);

    position: relative;
    top: -3px;
  }
  @if $direction = 'left' {
    @include _setArrow($arrowsize, $borderColor, $borderWidth);
    transform: matrix(-0.71,-0.71,0.71,-0.71,0,0); // rotate(-135deg);
  
    position: relative;
    top: -2px;
  }
}

@mixin  ellipsis($w:auto) {
  width: $w;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  word-wrap: normal;
}

@mixin ellipsisLn($line) {
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: $line;
}

@mixin text_wrap() {
  word-wrap:break-word;
  word-break:break-all;
}

@mixin hyphens() {
  word-wrap:break-word;
  -webkit-hyphens:auto;
  hyphens:auto;
}