2016-09-08 17:19:15 +00:00
|
|
|
/**
|
|
|
|
* Animation mixin.
|
|
|
|
*/
|
|
|
|
@mixin animation($animate...) {
|
|
|
|
$max: length($animate);
|
|
|
|
$animations: '';
|
|
|
|
|
|
|
|
@for $i from 1 through $max {
|
|
|
|
$animations: #{$animations + nth($animate, $i)};
|
|
|
|
|
|
|
|
@if $i < $max {
|
|
|
|
$animations: #{$animations + ", "};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
-webkit-animation: $animations;
|
|
|
|
-moz-animation: $animations;
|
|
|
|
-o-animation: $animations;
|
|
|
|
animation: $animations;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Keyframes mixin.
|
|
|
|
*/
|
|
|
|
@mixin keyframes($animationName) {
|
|
|
|
@-webkit-keyframes #{$animationName} {
|
|
|
|
@content;
|
|
|
|
}
|
|
|
|
@-moz-keyframes #{$animationName} {
|
|
|
|
@content;
|
|
|
|
}
|
|
|
|
@-o-keyframes #{$animationName} {
|
|
|
|
@content;
|
|
|
|
}
|
|
|
|
@keyframes #{$animationName} {
|
|
|
|
@content;
|
|
|
|
}
|
2016-09-13 16:15:07 +00:00
|
|
|
}
|
|
|
|
|
2016-09-15 02:20:54 +00:00
|
|
|
@mixin circle($diameter) {
|
|
|
|
width: $diameter;
|
|
|
|
height: $diameter;
|
|
|
|
border-radius: 50%;
|
|
|
|
}
|
|
|
|
|
|
|
|
@mixin absoluteAligning($sizeX, $sizeY) {
|
|
|
|
top: 50%;
|
|
|
|
left: 50%;
|
|
|
|
position: absolute;
|
|
|
|
@include transform(translate(-#{$sizeX / 2}, -#{$sizeY / 2}))
|
|
|
|
}
|
|
|
|
|
2016-09-13 16:15:07 +00:00
|
|
|
@mixin transform($func) {
|
|
|
|
-moz-transform: $func;
|
|
|
|
-ms-transform: $func;
|
|
|
|
-webkit-transform: $func;
|
|
|
|
-o-transform: $func;
|
|
|
|
transform: $func;
|
|
|
|
}
|
|
|
|
|
|
|
|
@mixin transition($transition...) {
|
|
|
|
-moz-transition: $transition;
|
|
|
|
-o-transition: $transition;
|
|
|
|
-webkit-transition: $transition;
|
|
|
|
transition: $transition;
|
|
|
|
}
|