_mixins.scss 1.94 KB
@mixin clearfix {
    &:after {
        content: "";
        display: table;
        clear: both;
    }
}

@mixin opacity($opacity) {
    opacity: $opacity;
    $opacity-ie: $opacity * 100;
    filter: alpha(opacity=$opacity-ie);
}

@mixin background-gradient-left2right($start-color, $end-color) {
    background-color: $start-color;
    background-image: -webkit-gradient(linear, left top, right top, from($start-color), to($end-color));
    background-image: -webkit-linear-gradient(to right, $start-color, $end-color);
    background-image:    -moz-linear-gradient(to right, $start-color, $end-color);
    background-image:     -ms-linear-gradient(to right, $start-color, $end-color);
    background-image:      -o-linear-gradient(to right, $start-color, $end-color);
    background-image:         linear-gradient(to right, $start-color, $end-color);
    filter:            progid:DXImageTransform.Microsoft.gradient(startColorstr='#{$start-color}', endColorstr='#{$end-color}', gradientType='1');
}

@mixin border-radius-left($val) {
    border-top-left-radius: $val;
    border-bottom-left-radius: $val;
}

@mixin border-radius-top($val) {
    border-top-left-radius: $val;
    border-top-right-radius: $val;
}

@mixin border-radius-bottom($val) {
    border-bottom-left-radius: $val;
    border-bottom-right-radius: $val;
}

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

@mixin flex() {
    display: -ms-flexbox;
    display: flex;
}

@mixin flex-justify-between() {
    -ms-flex-pack: justify;
    justify-content: space-between;
}

@mixin flex-align-center() {
    -ms-flex-align: center;
    align-items: center;
}

@mixin flex-wrap($value) {
    -ms-flex-wrap: $value;
    flex-wrap: $value;
}

@mixin flex-justify-center() {
    -ms-flex-pack: center;
    justify-content: center; 
}