-
-
Save greypants/3185028 to your computer and use it in GitHub Desktop.
SCSS: keyframe mixins
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
// ====================================================================== | |
// Animation.scss | |
// - Contains helpers for keyframes animation in css3 | |
// - Only functionally with Sass 3.2.0 Alpha and Compass 0.13.alpha | |
// ====================================================================== | |
@mixin animation-name($name) { | |
-webkit-animation-name: $name; | |
-moz-animation-name: $name; | |
-ms-animation-name: $name; | |
animation-name: $name; | |
} | |
@mixin animation-duration($name) { | |
-webkit-animation-duration: $name; | |
-moz-animation-duration: $name; | |
-ms-animation-duration: $name; | |
animation-duration: $name; | |
} | |
@mixin animation-timing-function($name) { | |
-webkit-animation-timing-function: $name; | |
-moz-animation-timing-function: $name; | |
-ms-animation-timing-function: $name; | |
animation-timing-function: $name; | |
} | |
@mixin animation-iteration-count($name) { | |
-webkit-animation-iteration-count: $name; | |
-moz-animation-iteration-count: $name; | |
-ms-animation-iteration-count: $name; | |
animation-iteration-count: $name; | |
} | |
@mixin animation-direction($name) { | |
-webkit-animation-direction: $name; | |
-moz-animation-direction: $name; | |
-ms-animation-direction: $name; | |
animation-direction: $name; | |
} | |
@mixin animation-delay($name) { | |
-webkit-animation-delay: $name; | |
-moz-animation-delay: $name; | |
-ms-animation-delay: $name; | |
animation-delay: $name; | |
} | |
@mixin animation-play-state($name) { | |
-webkit-animation-play-state: $name; | |
-moz-animation-play-state: $name; | |
-ms-animation-play-state: $name; | |
animation-play-state: $name; | |
} | |
@mixin animation-fill-mode($name) { | |
-webkit-animation-fill-mode: $name; | |
-moz-animation-fill-mode: $name; | |
-ms-animation-fill-mode: $name; | |
animation-fill-mode: $name; | |
} | |
@mixin keyframes($name) { | |
@-webkit-keyframes $name { @content; } | |
@-moz-keyframes $name { @content; } | |
@-ms-keyframes $name { @content; } | |
@keyframes $name { @content; } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment