Created
February 17, 2021 15:38
-
-
Save niikkiin/3569f7acced188703a3556c889431727 to your computer and use it in GitHub Desktop.
SCSS MIXINS FOR ANIMATIONS
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
// keyframes mixin | |
@mixin keyframes($name) { | |
@-webkit-keyframes #{$name} { | |
@content; | |
} | |
@-moz-keyframes #{$name} { | |
@content; | |
} | |
@-ms-keyframes #{$name} { | |
@content; | |
} | |
@keyframes #{$name} { | |
@content; | |
} | |
} | |
// how to use keyframes mixin | |
@include keyframes(bgcolor) { | |
0% { | |
background-color: #ffccf2; | |
} | |
50% { | |
background-color: #ccffcc; | |
} | |
100% { | |
background-color: #ccffff; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment