$black:#000000;
$white:#ffffff;
$red: #f56c6c;
$blue:#409eff;
$gray:#cccccc;

// 水平垂直居中
@mixin flex_center {
  display: flex;
  justify-content: center;
  align-items: center;
}

// 设置宽高 默认100%
@mixin set_w_h($w: fill, $h: fill) {
  @if ($w == fill) {
    width: 100%;
  } @else if ($w == auto) {
    width: auto;
  } @else {
    width: #{$w}px;
  }
  @if ($h == fill) {
    height: 100%;
  } @else if ($h == auto) {
    height: auto;
  } @else {
    height: #{$h}px;
  }
}

// 单行文本省略号
@mixin omit {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

// 多行文本省略号
@mixin omit_more {
  display: -webkit-box;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-all;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

// 扩展点击区域(多用于移动端)
@mixin extend_click {
  position: relative;
  &:before {
    content: "";
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
  }
}