.t-w-0 {
    width: 0;
}

// 字体对齐
.t-text-right {
	text-align: right;
}
.t-text-center {
	text-align: center;
}
.t-text-left {
	text-align: left;
}

// 字体样式
.t-text-through {
    text-decoration: line-through;
}

// 字体粗细
.t-font-bold {
    font-weight: bold;
}
.t-font-normal {
    font-weight: normal;
}

// flex
.t-inline-flex {
    display: inline-flex;
	flex-direction: row;
}
.t-flex {
	display: flex;
	flex-direction: row;
}

.t-flex-col {
	display: flex;
	flex-direction: column;
}

.t-flex-wrap {
	flex-wrap: wrap;
}

.t-flex-nowrap {
	flex-wrap: nowrap;
}

.t-col-center {
	align-items: center;
}

.t-col-top {
	align-items: flex-start;
}

.t-col-bottom {
	align-items: flex-end;
}

.t-row-center {
	justify-content: center;
}

.t-row-left {
	justify-content: flex-start;
}

.t-row-right {
	justify-content: flex-end;
}

.t-row-between {
	justify-content: space-between;
}

.t-row-around {
	justify-content: space-around;
}

// 定义flex等分
@for $i from 0 through 12 {
	.t-flex-#{$i} {
		flex: $i;
	}
}


// 文字溢出处理
@mixin line {
  overflow : hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-box-orient: vertical;
}
@for $i from 2 through 5 {
  .t-line-#{$i} {
    @include line;
    -webkit-line-clamp: $i;
  }
}
.t-line-1 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}


// 定义字体(px)单位，小于20都为px单位字体
@for $i from 9 to 20 {
	.t-font-#{$i} {
		font-size: $i + px;
	}
}

// 定义字体(rpx)单位，大于或等于20的都为rpx单位字体
@for $i from 20 through 40 {
	.t-font-#{$i} {
		font-size: $i + rpx;
	}
}

// 定义内外边距，auto和历遍1-80
.t-m-l-auto {
    margin-left: auto;
}
.t-m-r-auto {
    margin-right: auto;
}
.t-m-t-auto {
    margin-top: auto;
}
.t-m-b-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
        .t-margin-#{$i}, .t-m-#{$i} {
            margin: $i + rpx;
        }
        
        // 得出：t-padding-30或者t-p-30
        .t-padding-#{$i}, .t-p-#{$i} {
            padding: $i + rpx;
        }
                
        @each $short, $long in l left, t top, r right, b bottom {
            // 缩写版，结果如： t-m-l-30
            // 定义外边距
            .t-m-#{$short}-#{$i} {
                margin-#{$long}: $i + rpx;
            }
            
            // 定义内边距
            .t-p-#{$short}-#{$i} {
                padding-#{$long}: $i + rpx;
            }
            
            // 完整版，结果如：t-margin-left-30
            // 定义外边距
            .t-margin-#{$long}-#{$i} {
                margin-#{$long}: $i + rpx;
            }
            
            // 定义内边距
            .t-padding-#{$long}-#{$i} {
                padding-#{$long}: $i + rpx;
            }
        }
    }
}