.uv-relative,
.uv-rela {
    position: relative;
}

.uv-absolute,
.uv-abso {
    position: absolute;
}

/* #ifndef APP-NVUE */
image {
    display: inline-block;
}

// 在weex，也即nvue中，所有元素默认为border-box
view,
text {
    box-sizing: border-box;
}
/* #endif */

.uv-font-xs {
    font-size: 22rpx;
}

.uv-font-sm {
    font-size: 26rpx;
}

.uv-font-md {
    font-size: 28rpx;
}

.uv-font-lg {
    font-size: 30rpx;
}

.uv-font-xl {
    font-size: 34rpx;
}

.uv-flex {
    /* #ifndef APP-NVUE */
    display: flex;
    /* #endif */
    flex-direction: row;
    align-items: center;
}

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

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

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

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

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

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

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

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

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

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

.uv-text-left {
    text-align: left;
}

.uv-text-center {
    text-align: center;
}

.uv-text-right {
    text-align: right;
}

.uv-flex-col {
    /* #ifndef APP-NVUE */
    display: flex;
    /* #endif */
    flex-direction: column;
}

.uv-weight-500{
    font-weight: 500;
}
.uv-weight-600{
    font-weight: 600;
}
.uv-weight-700{
    font-weight: 700;
}

.uv-primary {
    color: $uv-primary;
}
.uv-success {
    color: $uv-success;
}
.uv-error {
    color: $uv-error;
}
.uv-info {
    color: $uv-info;
}

// 定义flex等分
@for $i from 0 through 12 {
    .uv-flex-#{$i} {
        flex: $i;
    }
}

@for $i from 0 through 60 {
    // 只要双数和能被5除尽的数
    @if $i % 2 == 0 or $i % 5 == 0 {
        // 得出：u-margin-30或者u-m-30
        .uv-margin-#{$i},
        .uv-m-#{$i} {
            margin: $i + rpx !important;
        }

        // 得出：u-padding-30或者u-p-30
        .uv-padding-#{$i},
        .uv-p-#{$i} {
            padding: $i + rpx !important;
        }

        @each $short, $long in l left, t top, r right, b bottom {
            // 缩写版，结果如： u-m-l-30
            // 定义外边距
            .uv-m-#{$short}-#{$i} {
                margin-#{$long}: $i + rpx !important;
            }

            // 定义内边距
            .uv-p-#{$short}-#{$i} {
                padding-#{$long}: $i + rpx !important;
            }

            // 完整版，结果如：u-margin-left-30
            // 定义外边距
            .uv-margin-#{$long}-#{$i} {
                margin-#{$long}: $i + rpx !important;
            }

            // 定义内边距
            .uv-padding-#{$long}-#{$i} {
                padding-#{$long}: $i + rpx !important;
            }
        }
    }
}

// 定义字体(rpx)单位，大于或等于20的都为rpx单位字体
@for $i from 20 through 50 {
    .uv-font-#{$i} {
        font-size: $i + rpx;
    }
}

.uv-navbar__content__left__text {
    overflow: hidden;
    max-width: 500rpx;
    white-space: nowrap;
    text-overflow: ellipsis;
}

// 上传图片的右边显示
.pj-upload {
    /deep/ .uv-upload__wrap {
        justify-content: flex-end;
    }
}