// 盒子基础设置
@mixin box($w: 100%, $h: 100%, $minW: null, $maxW: null, $minH: null, $maxH: null, ) {
  @if $w {
    width: $w;
  }

  @if $h {
    height: $h;
  }

  @if $minW {
    min-width: $minW;
  }

  @if $maxW {
    max-width: $maxW;
  }

  @if $minH {
    min-height: $minH;
  }

  @if $maxH {
    max-height: $maxH;
  }
}

/**
 * 字体基础属性
 * fz : 字体大小
 * fw : 字体粗细
 */
@mixin font($fz, $fw: null, $fm: null) {
  font-size: $fz;

  @if $fw {
    font-weight: $fw;
  }

  @if $fm {
    font-family: $fm;
  }
}

/**
 * 边框
 */
@mixin border($borderWidth, $borderColor, $radio: 0) {
  border: $borderWidth solid;
  border-radius: $radio;

  @if $borderColor {
    border-color: $borderColor;
  }
}

/**
 * flex布局属性
 * dir   : 对齐方式
 * main  : 主轴
 * cross : 交叉轴
 */
@mixin flex($dir: row, $main: flex-start, $cross: stretch) {
  display: flex;
  flex-direction: $dir;
  justify-content: $main;
  align-items: $cross;
}

@mixin ellipsis() {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
