| @mixin box-shadow($shadow...) { |
| -webkit-box-shadow: $shadow; |
| -moz-box-shadow: $shadow; |
| box-shadow: $shadow; |
| } |
| |
| @mixin border-radius($radius...) { |
| -webkit-border-radius: $radius; |
| -moz-border-radius: $radius; |
| border-radius: $radius; |
| } |
| |
| @mixin border-top-left-radius($radius...) { |
| -webkit-border-top-left-radius: $radius; |
| -moz-border-radius-topleft: $radius; |
| border-top-left-radius: $radius; |
| } |
| |
| @mixin border-top-right-radius($radius...) { |
| -webkit-border-top-right-radius: $radius; |
| -moz-border-radius-topright: $radius; |
| border-top-right-radius: $radius; |
| } |
| |
| @mixin transition($transition...) { |
| -webkit-transition: $transition; |
| -moz-transition: $transition; |
| -o-transition: $transition; |
| transition: $transition; |
| } |
| |
| @mixin user-select($select...) { |
| -webkit-user-select: $select; /* Chrome all / Safari all */ |
| -moz-user-select: $select; /* Firefox all */ |
| -ms-user-select: $select; /* IE 10+ */ |
| -o-user-select: $select; |
| user-select: $select; |
| } |
| |
| @mixin keyframes($name) { |
| @-o-keyframes #{$name} { @content }; |
| @-moz-keyframes #{$name} { @content }; |
| @-webkit-keyframes #{$name} { @content }; |
| @keyframes #{$name} { @content }; |
| } |
| |
| @mixin animation($animation...) { |
| -o-animation: $animation; |
| -moz-animation: $animation; |
| -webkit-animation: $animation; |
| animation: $animation; |
| } |
| |
| @function str-replace($string, $search, $replace: "") { |
| $index: str-index($string, $search); |
| |
| @if $index { |
| @return str-slice($string, 1, $index - 1) + $replace + str-replace(str-slice($string, $index + str-length($search)), $search, $replace); |
| } |
| |
| @return $string; |
| } |
| |
| @mixin font-face($name, $path, $weight: null, $style: null, $exts: eot woff2 woff ttf svg) { |
| $src: null; |
| |
| $extmods: ( |
| eot: "?", |
| svg: "#" + str-replace($name, " ", "_") |
| ); |
| |
| $formats: ( |
| otf: "opentype", |
| ttf: "truetype" |
| ); |
| |
| @each $ext in $exts { |
| $extmod: if(map-has-key($extmods, $ext), $ext + map-get($extmods, $ext), $ext); |
| $format: if(map-has-key($formats, $ext), map-get($formats, $ext), $ext); |
| $src: append($src, url(quote($path + "." + $extmod)) format(quote($format)), comma); |
| } |
| |
| @font-face { |
| font-family: quote($name); |
| font-style: $style; |
| font-weight: $weight; |
| src: $src; |
| } |
| } |