@charset "utf-8";

@mixin after(){
    &:after{
        content: '\20';
        display: block;
        height:0px;
        width:0px;
        clear:both;
        margin-top: -0px;
    }
}

@mixin iconPadding($width:6px){
    &::before{
        content: '\20';
        position: absolute;
        top: 0px - $width;
        right: 0px - $width;
        bottom: 0px - $width;
        left: 0px - $width;
        z-index: 1;
    }
}

@mixin supTag(){//上标
    .nu_supTag{
        display: inline-block;
        vertical-align: middle;
        text-align: center;
        position: absolute;
        font-weight: normal;
        padding: 4px 6px 3px;
        line-height: 1;
        font-size: $fontSize28;
        background: $bgOrange;
        color: $colorf;
        border-radius: 11px;
        top: 0;
        right: 0;
        min-width: $fontSize28 + 8;
        transform:translate3d(50%,-60%,0) scale(0.65);
        transform-origin: 50% 50%;
    }
}
@mixin borderL($color:$brCcc){//左边线
    position: relative;
    &:before{
        content: "\20";
        border-left: {
            style: solid;
            width: 1px;
            color: $color;
        }
        position: absolute;
        width: 0;
        top: 0px;
        bottom: 0;
        left: 0;
        transform: scaleX(0.5);
        z-index: 1;
    }
}
@mixin borderR($color:$brCcc){//右边线
    position: relative;
    &:after{
        content: "\20";
        border-right: {
            style: solid;
            width: 1px;
            color: $color;
        }
        position: absolute;
        width: 0;
        top: 0px;
        bottom: 0;
        right: 0;
        transform: scaleX(0.5);
        z-index: 1;
    }
}

@mixin borderT($color:$brCcc){//上边线
    position: relative;
    &:before{
        content: "\20";
        border-top: {
            style: solid;
            width: 1px;
            color: $color;
        }
        position: absolute;
        height: 0;
        width: 100%;
        top: 0;
        left: 0;
        right: 0;
        transform: scaleY(0.5);
        z-index: 1;
    }
}


@mixin borderB($color:$brCcc){//下边线
    position: relative;
    &:after{
        content: "\20";
        border-bottom: {
            style: solid;
            width: 1px;
            color: $color;
        }
        position: absolute;
        height: 0;
        left: 0px;
        bottom: 0;
        right: 0;
        transform: scaleY(0.5);
        z-index: 1;
    }
}


//旋转动画
@mixin spinnerSpin($ext, $step:1,$deg: 360){
    @keyframes nu_spinner-spin-#{$ext} {
        @for $i from 0 through $step{
            $degItme: $deg / $step * $i;
            $ratio: ($degItme * 100 / $deg) + '%';
            #{$ratio}{
                transform: rotate(#{$degItme}deg);
            }
        }
    }
}

// 修正兼容flex：1
@mixin flexFix(){
    -ms-flex: 1 1 0.000000001px;
    -webkit-box-flex: 1;
    -webkit-flex: 1;
    flex: 1;
    -webkit-flex-basis: 0.000000001px;
    flex-basis: 0.000000001px;
    width: 1%;
}

// 重置iphone默认样式
@mixin resetIphone() {
    appearance: none; //去除默认样式
    text-size-adjust: none; //不要定义成可继承的或全局的
    tap-highlight-color: transparent; //当你点击一个链接或者通过Javascript定义的可点击元素的时候，它就会出现一个半透明的灰色背景。
}

// css限制文字显示行数,多余部分隐藏
@mixin lineClamp ($limitRows: 2) {
    text-overflow: -o-ellipsis-lastline;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: $limitRows;
    -webkit-box-orient: vertical;
}
