Last active
December 29, 2015 13:19
-
-
Save imlinus/7676884 to your computer and use it in GitHub Desktop.
animate/keyframes/transition helper mixins
This file contains hidden or 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
| // Mixin for keyframes | |
| // basic usage: | |
| // @include keyframes(name) { | |
| // 0% { background: yellow; } | |
| // 100% { background: blue; } | |
| // } | |
| @mixin keyframes($name) { | |
| @-webkit-keyframes $name { @content; } | |
| @-moz-keyframes $name { @content; } | |
| @keyframes $name { @content; } | |
| } | |
| // Mixin for calling an animation | |
| // basic usage: | |
| // @include animation(animation .5s ease-in-out); | |
| @mixin animation($animation...) { | |
| @include prefix(animation, $animation...); | |
| } | |
| // Mixin for calling an transition | |
| // basic usage: | |
| // @include transition(all .25s ease-in-out); | |
| @mixin transition($transition...) { | |
| @include prefix(transition, $transition...); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment