Created
January 19, 2016 16:49
-
-
Save dbox/b3d3f8286dda37503669 to your computer and use it in GitHub Desktop.
waypoints basic
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
// Create a basic animation triggered by waypoints | |
// Defaults to fade-in-up type animation, but useful for simple fades or slides. | |
@mixin waypoint-basic( | |
$y-start: 30px, | |
$opacity-start: 0, | |
$x-start: 0, | |
$y-end: 0, | |
$opacity-end: 1, | |
$x-end: 0, | |
$duration: .2s, | |
$class-to-toggle: ('.resolved'), | |
$easing: $ease-out-quad) { | |
transform: translateY($y-start) translateX($x-start); | |
transition: all $duration $easing; | |
opacity: $opacity-start; | |
&#{$class-to-toggle} { | |
// $.resolved { | |
opacity: $opacity-end; | |
transform: translateY($y-end) translateX($x-end); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment