_mixins.scss 1.2 KB
/*
 | @header mixins
 | @author wangzhixiang (zhixiang.wang@yoho.cn)
 | @abstract
 */
@mixin font-face($font-family,$file-path,$font-weight:normal,$font-style:normal){
    @font-face {
        font: {
            family: $font-family;
            weight: $font-weight;
            style: $font-style;
        }
        src: url("#{$file-path}.eot");
        src: url("#{$file-path}.eot?#iefix") format("embedded-opentype"),
        url("#{$file-path}.woff") format("woff"),
        url("#{$file-path}.ttf") format("truetype"),
        url("#{$file-path}.svg##{$font-family}") format("svg");
    }
}

@mixin size($width, $height){
    width: $width;
    height: $height;
}

@mixin text-overflow(){
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@mixin hide-text(){
    font: 0/0 a;
    color: transparent;
    text-shadow: 0;
    background-color: transparent;
    border: 0;
}

@mixin placeholder($color: $placeholder){
    &:-moz-placeholder {
        color: $color;
    }
    &:-ms-input-placeholder {
        color: $color;
    }
    &:-webkit-input-placeholder {
        color: $color;
    }
}

@mixin arrow($type, $width ,$size) {
    .YOHOBUY-arrow-#{$type} {
        position: relative;
    }
}