@import "variables";

// 字体大小
$sizes: $font-extra-small $font-small $font-base $font-medium $font-large $font-extra-large;
$fontNames: 'extra-small' 'small' 'base' 'medium' 'large' 'extra-large';

.f {
  @each $name in $fontNames {
    $i: index($fontNames, $name);
    $size: nth($sizes, $i);
    &-#{$name} {
      font-size: $size;
    }
  }
}

// 对齐方式

.t-center {
  text-align: center;
}

.t-justify {
  text-align: justify;
}

.t-left {
  text-align: left;
}

.t-right {
  text-align: right;
}

// 溢出处理

.t-ellipsis {
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  max-width: 100%;
}

.t-ellipsis-line2 {
  display: -webkit-box;
  word-break: break-all;
  text-overflow: ellipsis;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2
}

// 删除线
.t-line-through {
  text-decoration: line-through
}

// 行高

.line-h1 {
  line-height: 100%;
}

.line-h1_2 {
  line-height: 1.2;
}

.line-h1_4 {
  line-height: 1.4;
}

.line-h1_6 {
  line-height: 1.6;
}

.line-h1_8 {
  line-height: 1.8;
}


.line-h2 {
  line-height: 2
}

.line-h3 {
  line-height: 3
}

// 字体
.bold {
  font-weight: bold
}
