-
Notifications
You must be signed in to change notification settings - Fork 174
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dramatically simplified mui-animation
- Loading branch information
1 parent
6bf1816
commit 81f46a7
Showing
1 changed file
with
2 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} |