animate 0.1.alpha.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +191 -0
- data/lib/animate.rb +9 -0
- data/stylesheets/_animate.scss +40 -0
- data/stylesheets/_helpers.scss +37 -0
- data/stylesheets/animate/_attention.scss +32 -0
- data/stylesheets/animate/_bounce.scss +63 -0
- data/stylesheets/animate/_fade.scss +52 -0
- data/stylesheets/animate/_flip.scss +83 -0
- data/stylesheets/animate/_lightSpeed.scss +16 -0
- data/stylesheets/animate/_roll.scss +16 -0
- data/stylesheets/animate/_rotate.scss +37 -0
- data/stylesheets/animate/_special.scss +13 -0
- data/stylesheets/animate/attention/_flash.scss +24 -0
- data/stylesheets/animate/attention/_pulse.scss +18 -0
- data/stylesheets/animate/attention/_shake.scss +43 -0
- data/stylesheets/animate/attention/_swing.scss +29 -0
- data/stylesheets/animate/attention/_tada.scss +41 -0
- data/stylesheets/animate/attention/_wiggle.scss +42 -0
- data/stylesheets/animate/attention/_wobble.scss +30 -0
- data/stylesheets/animate/bounce/_bounceIn.scss +119 -0
- data/stylesheets/animate/bounce/_bounceOut.scss +107 -0
- data/stylesheets/animate/fade/_fadeIn.scss +159 -0
- data/stylesheets/animate/fade/_fadeOut.scss +159 -0
- data/stylesheets/animate/flip/_flipIn.scss +58 -0
- data/stylesheets/animate/flip/_flipOut.scss +46 -0
- data/stylesheets/animate/lightSpeed/_lightSpeedIn.scss +25 -0
- data/stylesheets/animate/lightSpeed/_lightSpeedOut.scss +17 -0
- data/stylesheets/animate/roll/_rollIn.scss +17 -0
- data/stylesheets/animate/roll/_rollOut.scss +16 -0
- data/stylesheets/animate/rotate/_rotateIn.scss +159 -0
- data/stylesheets/animate/rotate/_rotateOut.scss +159 -0
- data/stylesheets/animate/special/_hinge.scss +38 -0
- metadata +134 -0
@@ -0,0 +1,16 @@
|
|
1
|
+
// ---------------------------------------------------------------------------
|
2
|
+
// imports
|
3
|
+
|
4
|
+
@import "lightSpeed/lightSpeedIn";
|
5
|
+
@import "lightSpeed/lightSpeedOut";
|
6
|
+
|
7
|
+
// ---------------------------------------------------------------------------
|
8
|
+
// lightSpeed [ in | out | all ]
|
9
|
+
|
10
|
+
@mixin animate-lightSpeed($sub: all, $class: $default-animation-class-mode) {
|
11
|
+
$sub : compact($sub);
|
12
|
+
$in : yepnope($sub, all in);
|
13
|
+
$out : yepnope($sub, all out);
|
14
|
+
@if $in { @include animate-lightSpeedIn ($class); }
|
15
|
+
@if $out { @include animate-lightSpeedOut ($class); }
|
16
|
+
}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
// ---------------------------------------------------------------------------
|
2
|
+
// imports
|
3
|
+
|
4
|
+
@import "roll/rollIn";
|
5
|
+
@import "roll/rollOut";
|
6
|
+
|
7
|
+
// ---------------------------------------------------------------------------
|
8
|
+
// roll [ in | out | all ]
|
9
|
+
|
10
|
+
@mixin animate-roll($sub: all, $class: $default-animation-class-mode) {
|
11
|
+
$sub : compact($sub);
|
12
|
+
$in : yepnope($sub, all in);
|
13
|
+
$out : yepnope($sub, all out);
|
14
|
+
@if $in { @include animate-rollIn ($class); }
|
15
|
+
@if $out { @include animate-rollOut ($class); }
|
16
|
+
}
|
@@ -0,0 +1,37 @@
|
|
1
|
+
// ---------------------------------------------------------------------------
|
2
|
+
// imports
|
3
|
+
|
4
|
+
@import "rotate/rotateIn";
|
5
|
+
@import "rotate/rotateOut";
|
6
|
+
|
7
|
+
// ---------------------------------------------------------------------------
|
8
|
+
// rotate [ in | in-only | inUp | inDown | inLeft | inRight |
|
9
|
+
// inDownLeft | inDownRight | inUpLeft | inUpRight |
|
10
|
+
// out | out-only | outUp | outDown | outLeft | outRight |
|
11
|
+
// outDownLeft | outDownRight | outUpLeft | outUpRight |
|
12
|
+
// left | right | up | down | all ]
|
13
|
+
|
14
|
+
@mixin animate-rotate($sub: all, $class: $default-animation-class-mode) {
|
15
|
+
$sub : compact($sub);
|
16
|
+
$in-only : yepnope($sub, all in in-only);
|
17
|
+
$inDownLeft : yepnope($sub, all in inDown inLeft left down);
|
18
|
+
$inDownRight : yepnope($sub, all in inDown inRight right down);
|
19
|
+
$inUpLeft : yepnope($sub, all in inUp inLeft left up);
|
20
|
+
$inUpRight : yepnope($sub, all in inUp inRight right up);
|
21
|
+
$out-only : yepnope($sub, all out out-only);
|
22
|
+
$outDownLeft : yepnope($sub, all out outDown outLeft left down);
|
23
|
+
$outDownRight : yepnope($sub, all out outDown outRight right down);
|
24
|
+
$outUpLeft : yepnope($sub, all out outUp outLeft left up);
|
25
|
+
$outUpRight : yepnope($sub, all out outUp outRight right up);
|
26
|
+
@if $in-only { @include animate-rotateIn (only, $class); }
|
27
|
+
@if $inDownLeft { @include animate-rotateInDownLeft ($class); }
|
28
|
+
@if $inDownRight { @include animate-rotateInDownRight ($class); }
|
29
|
+
@if $inUpLeft { @include animate-rotateInUpLeft ($class); }
|
30
|
+
@if $inUpRight { @include animate-rotateInUpRight ($class); }
|
31
|
+
@if $out-only { @include animate-rotateOut (only, $class); }
|
32
|
+
@if $outDownLeft { @include animate-rotateOutDownLeft ($class); }
|
33
|
+
@if $outDownRight { @include animate-rotateOutDownRight ($class); }
|
34
|
+
@if $outUpLeft { @include animate-rotateOutUpLeft ($class); }
|
35
|
+
@if $outUpRight { @include animate-rotateOutUpRight ($class); }
|
36
|
+
}
|
37
|
+
|
@@ -0,0 +1,13 @@
|
|
1
|
+
// ---------------------------------------------------------------------------
|
2
|
+
// imports
|
3
|
+
|
4
|
+
@import "special/hinge";
|
5
|
+
|
6
|
+
// ---------------------------------------------------------------------------
|
7
|
+
// special [ hinge | all ]
|
8
|
+
|
9
|
+
@mixin animate-special($sub: all, $class: $default-animation-class-mode) {
|
10
|
+
$sub : compact($sub);
|
11
|
+
$hinge : yepnope($sub, all hinge);
|
12
|
+
@if $hinge { @include animate-hinge($class); }
|
13
|
+
}
|
@@ -0,0 +1,24 @@
|
|
1
|
+
// ---------------------------------------------------------------------------
|
2
|
+
// flash
|
3
|
+
|
4
|
+
@mixin animate-flash($class: $default-animation-class-mode) {
|
5
|
+
$name: flash;
|
6
|
+
@include keyframes($name) {
|
7
|
+
0% {
|
8
|
+
opacity: 1;
|
9
|
+
}
|
10
|
+
25% {
|
11
|
+
opacity: 0;
|
12
|
+
}
|
13
|
+
50% {
|
14
|
+
opacity: 1;
|
15
|
+
}
|
16
|
+
75% {
|
17
|
+
opacity: 0;
|
18
|
+
}
|
19
|
+
100% {
|
20
|
+
opacity: 1;
|
21
|
+
}
|
22
|
+
}
|
23
|
+
@include animation-class($name, $class) {}
|
24
|
+
}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
// ---------------------------------------------------------------------------
|
2
|
+
// pulse
|
3
|
+
|
4
|
+
@mixin animate-pulse($class: $default-animation-class-mode) {
|
5
|
+
$name: pulse;
|
6
|
+
@include keyframes($name) {
|
7
|
+
0% {
|
8
|
+
@include scale(1);
|
9
|
+
}
|
10
|
+
50% {
|
11
|
+
@include scale(1.1);
|
12
|
+
}
|
13
|
+
100% {
|
14
|
+
@include scale(1);
|
15
|
+
}
|
16
|
+
}
|
17
|
+
@include animation-class($name, $class) {}
|
18
|
+
}
|
@@ -0,0 +1,43 @@
|
|
1
|
+
// ---------------------------------------------------------------------------
|
2
|
+
// shake
|
3
|
+
|
4
|
+
@mixin animate-shake($class: $default-animation-class-mode) {
|
5
|
+
$name: shake;
|
6
|
+
@include keyframes($name) {
|
7
|
+
0% {
|
8
|
+
@include translateX(0);
|
9
|
+
}
|
10
|
+
10% {
|
11
|
+
@include translateX(-10px);
|
12
|
+
}
|
13
|
+
20% {
|
14
|
+
@include translateX(10px);
|
15
|
+
}
|
16
|
+
30% {
|
17
|
+
@include translateX(-10px);
|
18
|
+
}
|
19
|
+
40% {
|
20
|
+
@include translateX(10px);
|
21
|
+
}
|
22
|
+
50% {
|
23
|
+
@include translateX(-10px);
|
24
|
+
}
|
25
|
+
60% {
|
26
|
+
@include translateX(10px);
|
27
|
+
}
|
28
|
+
70% {
|
29
|
+
@include translateX(-10px);
|
30
|
+
}
|
31
|
+
80% {
|
32
|
+
@include translateX(10px);
|
33
|
+
}
|
34
|
+
90% {
|
35
|
+
@include translateX(-10px);
|
36
|
+
}
|
37
|
+
100% {
|
38
|
+
@include translateX(0);
|
39
|
+
}
|
40
|
+
}
|
41
|
+
@include animation-class($name, $class) {}
|
42
|
+
}
|
43
|
+
|
@@ -0,0 +1,29 @@
|
|
1
|
+
// ---------------------------------------------------------------------------
|
2
|
+
// swing
|
3
|
+
|
4
|
+
@mixin animate-swing($class: $default-animation-class-mode) {
|
5
|
+
$name: swing;
|
6
|
+
@include keyframes($name) {
|
7
|
+
20%, 40%, 60%, 80%, 100% {
|
8
|
+
@include transform-origin(top, center);
|
9
|
+
}
|
10
|
+
20% {
|
11
|
+
@include rotate(15deg);
|
12
|
+
}
|
13
|
+
40% {
|
14
|
+
@include rotate(-10deg);
|
15
|
+
}
|
16
|
+
60% {
|
17
|
+
@include rotate(5deg);
|
18
|
+
}
|
19
|
+
80% {
|
20
|
+
@include rotate(-5deg);
|
21
|
+
}
|
22
|
+
100% {
|
23
|
+
@include rotate(0deg);
|
24
|
+
}
|
25
|
+
}
|
26
|
+
@include animation-class($name, $class) {
|
27
|
+
@include transform-origin(top, center);
|
28
|
+
}
|
29
|
+
}
|
@@ -0,0 +1,41 @@
|
|
1
|
+
// ---------------------------------------------------------------------------
|
2
|
+
// tada
|
3
|
+
|
4
|
+
@mixin animate-tada($class: $default-animation-class-mode) {
|
5
|
+
$name: tada;
|
6
|
+
@include keyframes($name) {
|
7
|
+
0% {
|
8
|
+
@include scale(1); }
|
9
|
+
10% {
|
10
|
+
@include transform(scale(0.9) rotate(-3deg));
|
11
|
+
}
|
12
|
+
20% {
|
13
|
+
@include transform(scale(0.9) rotate(-3deg));
|
14
|
+
}
|
15
|
+
30% {
|
16
|
+
@include transform(scale(1.1) rotate(3deg));
|
17
|
+
}
|
18
|
+
40% {
|
19
|
+
@include transform(scale(1.1) rotate(-3deg));
|
20
|
+
}
|
21
|
+
50% {
|
22
|
+
@include transform(scale(1.1) rotate(3deg));
|
23
|
+
}
|
24
|
+
60% {
|
25
|
+
@include transform(scale(1.1) rotate(-3deg));
|
26
|
+
}
|
27
|
+
70% {
|
28
|
+
@include transform(scale(1.1) rotate(3deg));
|
29
|
+
}
|
30
|
+
80% {
|
31
|
+
@include transform(scale(1.1) rotate(-3deg));
|
32
|
+
}
|
33
|
+
90% {
|
34
|
+
@include transform(scale(1.1) rotate(3deg));
|
35
|
+
}
|
36
|
+
100% {
|
37
|
+
@include transform(scale(1) rotate(0));
|
38
|
+
}
|
39
|
+
}
|
40
|
+
@include animation-class($name, $class) {}
|
41
|
+
}
|
@@ -0,0 +1,42 @@
|
|
1
|
+
// ---------------------------------------------------------------------------
|
2
|
+
// wiggle
|
3
|
+
|
4
|
+
@mixin animate-wiggle($class: $default-animation-class-mode) {
|
5
|
+
$name: wiggle;
|
6
|
+
@include keyframes($name) {
|
7
|
+
0% {
|
8
|
+
@include skewX(9deg);
|
9
|
+
}
|
10
|
+
10% {
|
11
|
+
@include skewX(-8deg);
|
12
|
+
}
|
13
|
+
20% {
|
14
|
+
@include skewX(7deg);
|
15
|
+
}
|
16
|
+
30% {
|
17
|
+
@include skewX(-6deg);
|
18
|
+
}
|
19
|
+
40% {
|
20
|
+
@include skewX(5deg);
|
21
|
+
}
|
22
|
+
50% {
|
23
|
+
@include skewX(-4deg);
|
24
|
+
}
|
25
|
+
60% {
|
26
|
+
@include skewX(3deg);
|
27
|
+
}
|
28
|
+
70% {
|
29
|
+
@include skewX(-2deg);
|
30
|
+
}
|
31
|
+
80% {
|
32
|
+
@include skewX(1deg);
|
33
|
+
}
|
34
|
+
90% {
|
35
|
+
@include skewX(0deg);
|
36
|
+
}
|
37
|
+
100% {
|
38
|
+
@include skewX(0deg);
|
39
|
+
}
|
40
|
+
}
|
41
|
+
@include animation-class($name, $class) {}
|
42
|
+
}
|
@@ -0,0 +1,30 @@
|
|
1
|
+
// ---------------------------------------------------------------------------
|
2
|
+
// wobble
|
3
|
+
|
4
|
+
@mixin animate-wobble($class: $default-animation-class-mode) {
|
5
|
+
$name: wobble;
|
6
|
+
@include keyframes($name) {
|
7
|
+
0% {
|
8
|
+
@include translateX(0%);
|
9
|
+
}
|
10
|
+
15% {
|
11
|
+
@include transform(translateX(-25%) rotate(-5deg));
|
12
|
+
}
|
13
|
+
30% {
|
14
|
+
@include transform(translateX(20%) rotate(3deg));
|
15
|
+
}
|
16
|
+
45% {
|
17
|
+
@include transform(translateX(-15%) rotate(-3deg));
|
18
|
+
}
|
19
|
+
60% {
|
20
|
+
@include transform(translateX(10%) rotate(2deg));
|
21
|
+
}
|
22
|
+
75% {
|
23
|
+
@include transform(translateX(-5%) rotate(-1deg));
|
24
|
+
}
|
25
|
+
100% {
|
26
|
+
@include transform(translateX(0%));
|
27
|
+
}
|
28
|
+
}
|
29
|
+
@include animation-class($name, $class) {}
|
30
|
+
}
|
@@ -0,0 +1,119 @@
|
|
1
|
+
// ---------------------------------------------------------------------------
|
2
|
+
// bounceIn
|
3
|
+
|
4
|
+
@mixin animate-bounceIn($class: $default-animation-class-mode) {
|
5
|
+
$name: bounceIn;
|
6
|
+
@include keyframes($name) {
|
7
|
+
0% {
|
8
|
+
opacity: 0;
|
9
|
+
@include scale(0.3);
|
10
|
+
}
|
11
|
+
50% {
|
12
|
+
opacity: 1;
|
13
|
+
@include scale(1.05);
|
14
|
+
}
|
15
|
+
70% {
|
16
|
+
@include scale(0.9);
|
17
|
+
}
|
18
|
+
100% {
|
19
|
+
@include scale(1);
|
20
|
+
}
|
21
|
+
}
|
22
|
+
@include animation-class($name, $class) {}
|
23
|
+
}
|
24
|
+
|
25
|
+
// ---------------------------------------------------------------------------
|
26
|
+
// bounceInDown
|
27
|
+
|
28
|
+
@mixin animate-bounceInDown($class: $default-animation-class-mode) {
|
29
|
+
$name: bounceInDown;
|
30
|
+
@include keyframes($name) {
|
31
|
+
0% {
|
32
|
+
opacity: 0;
|
33
|
+
@include translateY(-2000px);
|
34
|
+
}
|
35
|
+
60% {
|
36
|
+
opacity: 1;
|
37
|
+
@include translateY(30px);
|
38
|
+
}
|
39
|
+
80% {
|
40
|
+
@include translateY(-10px);
|
41
|
+
}
|
42
|
+
100% {
|
43
|
+
@include translateY(0);
|
44
|
+
}
|
45
|
+
}
|
46
|
+
@include animation-class($name, $class) {}
|
47
|
+
}
|
48
|
+
|
49
|
+
// ---------------------------------------------------------------------------
|
50
|
+
// bounceInUp
|
51
|
+
|
52
|
+
@mixin animate-bounceInUp($class: $default-animation-class-mode) {
|
53
|
+
$name: bounceInUp;
|
54
|
+
@include keyframes($name) {
|
55
|
+
0% {
|
56
|
+
opacity: 0;
|
57
|
+
@include translateY(2000px);
|
58
|
+
}
|
59
|
+
60% {
|
60
|
+
opacity: 1;
|
61
|
+
@include translateY(-30px);
|
62
|
+
}
|
63
|
+
80% {
|
64
|
+
@include translateY(10px);
|
65
|
+
}
|
66
|
+
100% {
|
67
|
+
@include translateY(0);
|
68
|
+
}
|
69
|
+
}
|
70
|
+
@include animation-class($name, $class) {}
|
71
|
+
}
|
72
|
+
|
73
|
+
// ---------------------------------------------------------------------------
|
74
|
+
// bounceInRight
|
75
|
+
|
76
|
+
@mixin animate-bounceInRight($class: $default-animation-class-mode) {
|
77
|
+
$name: bounceInRight;
|
78
|
+
@include keyframes($name) {
|
79
|
+
0% {
|
80
|
+
opacity: 0;
|
81
|
+
@include translateX(2000px);
|
82
|
+
}
|
83
|
+
60% {
|
84
|
+
opacity: 1;
|
85
|
+
@include translateX(-30px);
|
86
|
+
}
|
87
|
+
80% {
|
88
|
+
@include translateX(10px);
|
89
|
+
}
|
90
|
+
100% {
|
91
|
+
@include translateX(0);
|
92
|
+
}
|
93
|
+
}
|
94
|
+
@include animation-class($name, $class) {}
|
95
|
+
}
|
96
|
+
|
97
|
+
// ---------------------------------------------------------------------------
|
98
|
+
// bounceInLeft
|
99
|
+
|
100
|
+
@mixin animate-bounceInLeft($class: $default-animation-class-mode) {
|
101
|
+
$name: bounceInLeft;
|
102
|
+
@include keyframes($name) {
|
103
|
+
0% {
|
104
|
+
opacity: 0;
|
105
|
+
@include translateX(-2000px);
|
106
|
+
}
|
107
|
+
60% {
|
108
|
+
opacity: 1;
|
109
|
+
@include translateX(30px);
|
110
|
+
}
|
111
|
+
80% {
|
112
|
+
@include translateX(-10px);
|
113
|
+
}
|
114
|
+
100% {
|
115
|
+
@include translateX(0);
|
116
|
+
}
|
117
|
+
}
|
118
|
+
@include animation-class($name, $class) {}
|
119
|
+
}
|
@@ -0,0 +1,107 @@
|
|
1
|
+
// ---------------------------------------------------------------------------
|
2
|
+
// bounceOut
|
3
|
+
|
4
|
+
@mixin animate-bounceOut($class: $default-animation-class-mode) {
|
5
|
+
$name: bounceOut;
|
6
|
+
@include keyframes(bounceOut) {
|
7
|
+
0% {
|
8
|
+
@include scale(1);
|
9
|
+
}
|
10
|
+
25% {
|
11
|
+
@include scale(0.95);
|
12
|
+
}
|
13
|
+
50% {
|
14
|
+
opacity: 1;
|
15
|
+
@include scale(1.1);
|
16
|
+
}
|
17
|
+
100% {
|
18
|
+
opacity: 0;
|
19
|
+
@include scale(0.3);
|
20
|
+
}
|
21
|
+
}
|
22
|
+
@include animation-class($name, $class) {}
|
23
|
+
}
|
24
|
+
|
25
|
+
// ---------------------------------------------------------------------------
|
26
|
+
// bounceOutUp
|
27
|
+
|
28
|
+
@mixin animate-bounceOutUp($class: $default-animation-class-mode) {
|
29
|
+
$name: bounceOutUp;
|
30
|
+
@include keyframes($name) {
|
31
|
+
0% {
|
32
|
+
@include translateY(0);
|
33
|
+
}
|
34
|
+
20% {
|
35
|
+
opacity: 1;
|
36
|
+
@include translateY(20px);
|
37
|
+
}
|
38
|
+
100% {
|
39
|
+
opacity: 0;
|
40
|
+
@include translateY(-2000px);
|
41
|
+
}
|
42
|
+
}
|
43
|
+
@include animation-class($name, $class) {}
|
44
|
+
}
|
45
|
+
|
46
|
+
// ---------------------------------------------------------------------------
|
47
|
+
// bounceOutDown
|
48
|
+
|
49
|
+
@mixin animate-bounceOutDown($class: $default-animation-class-mode) {
|
50
|
+
$name: bounceOutDown;
|
51
|
+
@include keyframes($name) {
|
52
|
+
0% {
|
53
|
+
@include translateY(0);
|
54
|
+
}
|
55
|
+
20% {
|
56
|
+
opacity: 1;
|
57
|
+
@include translateY(-20px);
|
58
|
+
}
|
59
|
+
100% {
|
60
|
+
opacity: 0;
|
61
|
+
@include translateY(2000px);
|
62
|
+
}
|
63
|
+
}
|
64
|
+
@include animation-class($name, $class) {}
|
65
|
+
}
|
66
|
+
|
67
|
+
// ---------------------------------------------------------------------------
|
68
|
+
// bounceOutLeft
|
69
|
+
|
70
|
+
@mixin animate-bounceOutLeft($class: $default-animation-class-mode) {
|
71
|
+
$name: bounceOutLeft;
|
72
|
+
@include keyframes($name) {
|
73
|
+
0% {
|
74
|
+
@include translateX(0);
|
75
|
+
}
|
76
|
+
20% {
|
77
|
+
opacity: 1;
|
78
|
+
@include translateX(20px);
|
79
|
+
}
|
80
|
+
100% {
|
81
|
+
opacity: 0;
|
82
|
+
@include translateX(-2000px);
|
83
|
+
}
|
84
|
+
}
|
85
|
+
@include animation-class($name, $class) {}
|
86
|
+
}
|
87
|
+
|
88
|
+
// ---------------------------------------------------------------------------
|
89
|
+
// bounceOutRight
|
90
|
+
|
91
|
+
@mixin animate-bounceOutRight($class: $default-animation-class-mode) {
|
92
|
+
$name: bounceOutRight;
|
93
|
+
@include keyframes($name) {
|
94
|
+
0% {
|
95
|
+
@include translateX(0);
|
96
|
+
}
|
97
|
+
20% {
|
98
|
+
opacity: 1;
|
99
|
+
@include translateX(-20px);
|
100
|
+
}
|
101
|
+
100% {
|
102
|
+
opacity: 0;
|
103
|
+
@include translateX(2000px);
|
104
|
+
}
|
105
|
+
}
|
106
|
+
@include animation-class($name, $class) {}
|
107
|
+
}
|