Skip to content

Instantly share code, notes, and snippets.

@teknotica
Created October 7, 2015 11:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save teknotica/7b79477ac7a0e7761901 to your computer and use it in GitHub Desktop.
Save teknotica/7b79477ac7a0e7761901 to your computer and use it in GitHub Desktop.
SCSS Animations Utils
@include keyframes(fadeIn) {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
@include keyframes(fadeOut) {
0% {
opacity: 1;
}
100% {
opacity: 0;
}
}
@include keyframes(fadeInUp) {
0% {
opacity: 0;
@include transform(translate3d(0, 30px, 0));
}
100% {
opacity: 1;
@include transform(none);
}
}
@include keyframes(animateTilt) {
0% {
width: 100%;
}
100% {
width: 0%;
}
}
@include keyframes(animateMaskLeft) {
0% {
-webkit-clip-path: polygon(0 0, 100% 0%, 100% 100%, 0% 100%);
clip-path: polygon(0 0, 100% 0%, 100% 100%, 0% 100%);
}
80% {
-webkit-clip-path: polygon(0 0, 100% 0%, 0% 100%, 0% 100%);
clip-path: polygon(0 0, 100% 0%, 100% 0%, 0% 100%);
}
100% {
-webkit-clip-path: polygon(0 0, 0% 0%, 0% 100%, 0% 100%);
clip-path: polygon(0 0, 0% 0%, 100% 0%, 0% 100%);
}
}
@include keyframes(animateMaskRight) {
0% {
-webkit-clip-path: polygon(0 0, 0% 0%, 0% 100%, 0% 100%);
clip-path: polygon(0 0, 0% 0%, 100% 0%, 0% 100%);
}
80% {
-webkit-clip-path: polygon(0 0, 100% 0%, 0% 100%, 0% 100%);
clip-path: polygon(0 0, 100% 0%, 100% 0%, 0% 100%);
}
100% {
-webkit-clip-path: polygon(0 0, 100% 0%, 100% 100%, 0% 100%);
clip-path: polygon(0 0, 100% 0%, 100% 100%, 0% 100%);
}
}
@include keyframes(blurIn) {
0% {
@include blur(0);
}
100% {
@include blur(5px);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment