@mixin flex {
  display: flex;
  flex-direction: row;
}

@mixin inline-flex {
  display: inline-flex;
  flex-direction: row;
}

@mixin flex-col {
  display: flex;
  flex-direction: column;
}

@mixin inline-flex-col {
  display: inline-flex;
  flex-direction: column;
}

@mixin flex-center {
  align-items: center;
  justify-content: center;
}

.-flex {
  @include flex;
}

.-inline-flex {
  @include inline-flex;
}

.-flex-col {
  @include flex-col;
}

.-inline-flex-col {
  @include inline-flex-col;
}

.-flex-center {
  @include flex-center;
}

.-flex-wrap {
  flex-wrap: wrap;
}

.-flex-nowrap {
  flex-wrap: nowrap;
}

.-col-center {
  align-items: center;
}

.-col-start {
  align-items: flex-start;
}

.-col-end {
  align-items: flex-end;
}

.-row-center {
  justify-content: center;
}

.-row-start {
  justify-content: flex-start;
}

.-row-end {
  justify-content: flex-end;
}

.-row-between {
  justify-content: space-between;
}

.-row-around {
  justify-content: space-around;
}

.-flex-auto {
  flex: auto;
  min-width: 0;
}

/* 定义flex等分 */
@for $i from 0 through 12 {
  .-flex-#{$i} {
    flex: $i;
    min-width: 0;
  }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

a {
    text-decoration: none;
}
a:hover {
    opacity: .9;
}

// ul, ol, li {
//     list-style: none;
// }


/* 定义内外边距，auto和历遍0-80 */
.-ml-auto {
  margin-left: auto;
}
.-mr-auto {
  margin-right: auto;
}
.-mt-auto {
  margin-top: auto;
}
.-mb-auto {
  margin-bottom: auto;
}
@for $i from 0 through 80 {
  /* 只要双数和能被5除尽的数 */
  @if $i % 2 == 0 or $i % 5 == 0 {
    /* 得出：t-margin-30或者t-m-30 */
    .-margin-#{$i}, .-m-#{$i} {
      margin: $i + px;
    }
    /* 得出：t-padding-30或者t-p-30 */
    .-padding-#{$i}, .-p-#{$i} {
      padding: $i + px;
    }
    @each $short, $long in l left, t top, r right, b bottom {
      /* 缩写版，结果如： t-ml-30 */
      /* 定义外边距 */
      .-m#{$short}-#{$i} {
        margin-#{$long}: $i + px;
      }
      /* 定义内边距 */
      .-p#{$short}-#{$i} {
        padding-#{$long}: $i + px;
      }
      /* 完整版，结果如：t-margin-left-30 */
      /* 定义外边距 */
      .-margin-#{$long}-#{$i} {
        margin-#{$long}: $i + px;
      }
      /* 定义内边距 */
      .-padding-#{$long}-#{$i} {
        padding-#{$long}: $i + px;
      }
    }
  }
}

/* 字体对齐 */
.-text-right {
    text-align: right;
}
.-text-center {
    text-align: center;
}
.-text-left {
    text-align: left;
}

/* 字体样式 */
.-text-through {
    text-decoration: line-through;
}

/* 字体粗细 */
.-font-bold {
    font-weight: bold;
}
.-font-normal {
    font-weight: normal;
}


/* 文字溢出处理 */
@mixin line {
    overflow : hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-box-orient: vertical;
  }
  @for $i from 2 through 5 {
    .-line-#{$i} {
      @include line;
      -webkit-line-clamp: $i;
    }
  }
  .-line-1 {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  
  /* 定义字体(px)单位，大于或等于20的都为px单位字体 */
  @for $i from 12 through 40 {
    .-font-#{$i} {
      font-size: $i + px;
    }
  }
  