mirror of
https://github.com/mue/mue.git
synced 2026-07-18 14:34:12 +02:00
Co-authored-by: Alex Sparkes <turbomarshmello@gmail.com> Co-authored-by: Wessel Tip <discord@go2it.eu> Co-authored-by: Isaac Saunders <contact@eartharoid.me>
28 lines
673 B
SCSS
28 lines
673 B
SCSS
// credit: https://joshbroton.com/quick-fix-sass-mixins-for-css-keyframe-animations/
|
|
@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;
|
|
animation: $animations;
|
|
}
|
|
|
|
@mixin keyframes($animationName) {
|
|
@-webkit-keyframes #{$animationName} {
|
|
@content;
|
|
}
|
|
@-moz-keyframes #{$animationName} {
|
|
@content;
|
|
}
|
|
@keyframes #{$animationName} {
|
|
@content;
|
|
}
|
|
} |