Skip to content

Commit

Permalink
Dramatically simplified mui-animation
Browse files Browse the repository at this point in the history
  • Loading branch information
KittyGiraudel committed Oct 13, 2015
1 parent 6bf1816 commit 81f46a7
Showing 1 changed file with 2 additions and 20 deletions.
22 changes: 2 additions & 20 deletions src/util/_animation.scss
Original file line number Diff line number Diff line change
@@ -1,25 +1,7 @@
/// Creates a keyframe from one or more effect functions and assigns it to the element by adding the `animation-name` property.
/// @param {Function} $effects... - One or more effect functions to build the keyframe with.
@mixin mui-animation($args...) {
$obj: -mui-process-args($args...);

// Get the name of the keyframe and then remove that value from the map
$name: map-get($obj, name);
$obj: map-remove($obj, name);

@at-root {
@keyframes #{$name} {
// Now iterate through each keyframe percentage
@each $pct, $props in $obj {
#{-mui-keyframe-pct($pct)} {
// Lastly, iterate through each CSS property within a percentage and print it out
@each $prop, $value in $props {
#{$prop}: #{$value};
}
}
}
}
}

$name: map-get(-mui-process-args($args...), name);
@include mui-keyframes($name, $args...);
animation-name: unquote($name);
}

0 comments on commit 81f46a7

Please sign in to comment.