saffron 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +5 -0
- data/.travis.yml +5 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +43 -0
- data/MIT +21 -0
- data/README.md +63 -0
- data/Rakefile +16 -0
- data/app/assets/stylesheets/_variables.scss +18 -0
- data/app/assets/stylesheets/entrances/_drop-in.scss +19 -0
- data/app/assets/stylesheets/entrances/_fade-in-down.scss +13 -0
- data/app/assets/stylesheets/entrances/_fade-in-left.scss +13 -0
- data/app/assets/stylesheets/entrances/_fade-in-right.scss +13 -0
- data/app/assets/stylesheets/entrances/_fade-in-up.scss +13 -0
- data/app/assets/stylesheets/entrances/_fade-in-zoom-big.scss +20 -0
- data/app/assets/stylesheets/entrances/_fade-in-zoom.scss +14 -0
- data/app/assets/stylesheets/entrances/_fade-in.scss +13 -0
- data/app/assets/stylesheets/entrances/_newspaper.scss +14 -0
- data/app/assets/stylesheets/entrances/_pop-in.scss +14 -0
- data/app/assets/stylesheets/entrances/_rise-in.scss +13 -0
- data/app/assets/stylesheets/entrances/_slide-in.scss +35 -0
- data/app/assets/stylesheets/entrances/_stretch.scss +33 -0
- data/app/assets/stylesheets/entrances/_turn-in.scss +31 -0
- data/app/assets/stylesheets/exits/_compress.scss +25 -0
- data/app/assets/stylesheets/exits/_drop-out.scss +14 -0
- data/app/assets/stylesheets/exits/_explode.scss +14 -0
- data/app/assets/stylesheets/exits/_fade-out-down.scss +14 -0
- data/app/assets/stylesheets/exits/_fade-out-left.scss +13 -0
- data/app/assets/stylesheets/exits/_fade-out-right.scss +13 -0
- data/app/assets/stylesheets/exits/_fade-out-up.scss +14 -0
- data/app/assets/stylesheets/exits/_fade-out-zoom-big.scss +19 -0
- data/app/assets/stylesheets/exits/_fade-out-zoom.scss +14 -0
- data/app/assets/stylesheets/exits/_fade-out.scss +13 -0
- data/app/assets/stylesheets/exits/_poof.scss +17 -0
- data/app/assets/stylesheets/exits/_rise-out.scss +14 -0
- data/app/assets/stylesheets/exits/_slide-out.scss +29 -0
- data/app/assets/stylesheets/exits/_turn-out.scss +33 -0
- data/app/assets/stylesheets/helpers/_animation.scss +3 -0
- data/app/assets/stylesheets/helpers/_contains.scss +4 -0
- data/app/assets/stylesheets/helpers/_keyframes.scss +25 -0
- data/app/assets/stylesheets/helpers/_prefix.scss +39 -0
- data/app/assets/stylesheets/helpers/_transform.scss +9 -0
- data/app/assets/stylesheets/helpers/_transition.scss +7 -0
- data/app/assets/stylesheets/in-place/_around-the-world.scss +12 -0
- data/app/assets/stylesheets/in-place/_bounce.scss +24 -0
- data/app/assets/stylesheets/in-place/_colors.scss +23 -0
- data/app/assets/stylesheets/in-place/_contract.scss +7 -0
- data/app/assets/stylesheets/in-place/_cube-flip.scss +55 -0
- data/app/assets/stylesheets/in-place/_enlarge.scss +7 -0
- data/app/assets/stylesheets/in-place/_expand.scss +6 -0
- data/app/assets/stylesheets/in-place/_flip.scss +19 -0
- data/app/assets/stylesheets/in-place/_float.scss +17 -0
- data/app/assets/stylesheets/in-place/_ping.scss +13 -0
- data/app/assets/stylesheets/in-place/_pulsate.scss +14 -0
- data/app/assets/stylesheets/in-place/_quiver.scss +42 -0
- data/app/assets/stylesheets/in-place/_shake.scss +24 -0
- data/app/assets/stylesheets/in-place/_spin.scss +12 -0
- data/app/assets/stylesheets/in-place/_square-dance.scss +18 -0
- data/app/assets/stylesheets/in-place/_sunrise.scss +12 -0
- data/app/assets/stylesheets/in-place/_sway.scss +17 -0
- data/app/assets/stylesheets/in-place/_teeter.scss +29 -0
- data/app/assets/stylesheets/saffron.scss +62 -0
- data/bin/saffron +9 -0
- data/features/install.feature +28 -0
- data/features/step_definitions/saffron.rb +37 -0
- data/features/support/env.rb +1 -0
- data/features/update.feature +37 -0
- data/features/version.feature +10 -0
- data/lib/saffron.rb +13 -0
- data/lib/saffron/engine.rb +4 -0
- data/lib/saffron/installer.rb +55 -0
- data/lib/saffron/version.rb +3 -0
- data/saffron.gemspec +31 -0
- data/saffron/_variables.scss +18 -0
- data/saffron/entrances/_drop-in.scss +19 -0
- data/saffron/entrances/_fade-in-down.scss +13 -0
- data/saffron/entrances/_fade-in-left.scss +13 -0
- data/saffron/entrances/_fade-in-right.scss +13 -0
- data/saffron/entrances/_fade-in-up.scss +13 -0
- data/saffron/entrances/_fade-in-zoom-big.scss +20 -0
- data/saffron/entrances/_fade-in-zoom.scss +14 -0
- data/saffron/entrances/_fade-in.scss +13 -0
- data/saffron/entrances/_newspaper.scss +14 -0
- data/saffron/entrances/_pop-in.scss +14 -0
- data/saffron/entrances/_rise-in.scss +13 -0
- data/saffron/entrances/_slide-in.scss +35 -0
- data/saffron/entrances/_stretch.scss +33 -0
- data/saffron/entrances/_turn-in.scss +31 -0
- data/saffron/exits/_compress.scss +25 -0
- data/saffron/exits/_drop-out.scss +14 -0
- data/saffron/exits/_explode.scss +14 -0
- data/saffron/exits/_fade-out-down.scss +14 -0
- data/saffron/exits/_fade-out-left.scss +13 -0
- data/saffron/exits/_fade-out-right.scss +13 -0
- data/saffron/exits/_fade-out-up.scss +14 -0
- data/saffron/exits/_fade-out-zoom-big.scss +19 -0
- data/saffron/exits/_fade-out-zoom.scss +14 -0
- data/saffron/exits/_fade-out.scss +13 -0
- data/saffron/exits/_poof.scss +17 -0
- data/saffron/exits/_rise-out.scss +14 -0
- data/saffron/exits/_slide-out.scss +29 -0
- data/saffron/exits/_turn-out.scss +33 -0
- data/saffron/helpers/_animation.scss +3 -0
- data/saffron/helpers/_contains.scss +4 -0
- data/saffron/helpers/_keyframes.scss +25 -0
- data/saffron/helpers/_prefix.scss +39 -0
- data/saffron/helpers/_transform.scss +9 -0
- data/saffron/helpers/_transition.scss +7 -0
- data/saffron/in-place/_around-the-world.scss +12 -0
- data/saffron/in-place/_bounce.scss +24 -0
- data/saffron/in-place/_colors.scss +23 -0
- data/saffron/in-place/_contract.scss +7 -0
- data/saffron/in-place/_cube-flip.scss +55 -0
- data/saffron/in-place/_enlarge.scss +7 -0
- data/saffron/in-place/_expand.scss +6 -0
- data/saffron/in-place/_flip.scss +19 -0
- data/saffron/in-place/_float.scss +17 -0
- data/saffron/in-place/_ping.scss +13 -0
- data/saffron/in-place/_pulsate.scss +14 -0
- data/saffron/in-place/_quiver.scss +42 -0
- data/saffron/in-place/_shake.scss +24 -0
- data/saffron/in-place/_spin.scss +12 -0
- data/saffron/in-place/_square-dance.scss +18 -0
- data/saffron/in-place/_sunrise.scss +12 -0
- data/saffron/in-place/_sway.scss +17 -0
- data/saffron/in-place/_teeter.scss +29 -0
- data/saffron/saffron.scss +62 -0
- data/tasks/.csscomb.json +297 -0
- data/tasks/.csslintrc +19 -0
- data/tasks/Gruntfile.js +111 -0
- data/tasks/compiled/index.html +11 -0
- data/tasks/compiled/saffron.css +3049 -0
- data/tasks/compiled/test.css +3086 -0
- data/tasks/package.json +32 -0
- data/tasks/test.scss +13 -0
- metadata +278 -0
@@ -0,0 +1,25 @@
|
|
1
|
+
@include keyframes(compress) {
|
2
|
+
0% {
|
3
|
+
@include transform(scaleY(1) translateZ(0));
|
4
|
+
}
|
5
|
+
30% {
|
6
|
+
@include transform(scaleY($stretch-compress-exageration));
|
7
|
+
}
|
8
|
+
50% {
|
9
|
+
@include transform(scaleY($stretch-compress-exageration - ($stretch-compress-exageration * .075)));
|
10
|
+
}
|
11
|
+
100% {
|
12
|
+
@include transform(scaleY(0));
|
13
|
+
}
|
14
|
+
}
|
15
|
+
|
16
|
+
@mixin compressUp($duration: 0.7s, $delay: 0s, $count: 1, $fill-mode: both, $timing: ease-out) {
|
17
|
+
@include animation(compress $count $duration $delay $fill-mode $timing);
|
18
|
+
@include prefix(transform-origin, 0 0, webkit moz spec);
|
19
|
+
}
|
20
|
+
|
21
|
+
@mixin compressDown($duration: 0.7s, $delay: 0s, $count: 1, $fill-mode: both, $timing: ease-out) {
|
22
|
+
@include animation(compress $count $duration $delay $fill-mode $timing);
|
23
|
+
@include prefix(transform-origin, 0 100%, webkit moz spec);
|
24
|
+
}
|
25
|
+
|
@@ -0,0 +1,14 @@
|
|
1
|
+
@include keyframes(dropOut) {
|
2
|
+
0% {
|
3
|
+
opacity: 1;
|
4
|
+
@include transform(translateZ(0));
|
5
|
+
}
|
6
|
+
100% {
|
7
|
+
opacity: 0;
|
8
|
+
@include transform(translateY($drop-rise-distance) rotate(-40deg));
|
9
|
+
}
|
10
|
+
}
|
11
|
+
|
12
|
+
@mixin dropOut($duration: 0.5s, $delay: 0s, $fill-mode: forwards) {
|
13
|
+
@include animation(dropOut $duration $delay $fill-mode);
|
14
|
+
}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
@include keyframes(explode) {
|
2
|
+
0% {
|
3
|
+
opacity: 1;
|
4
|
+
@include transform(translateZ(0));
|
5
|
+
}
|
6
|
+
100% {
|
7
|
+
opacity: 0;
|
8
|
+
@include transform(scale(5));
|
9
|
+
}
|
10
|
+
}
|
11
|
+
|
12
|
+
@mixin explode($duration: 0.5s, $delay: 0s, $fill-mode: forwards) {
|
13
|
+
@include animation(explode $duration $delay $fill-mode);
|
14
|
+
}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
@include keyframes(fadeOutDown) {
|
2
|
+
0% {
|
3
|
+
opacity: 1;
|
4
|
+
@include transform(translateZ(0));
|
5
|
+
}
|
6
|
+
100% {
|
7
|
+
opacity: 0;
|
8
|
+
@include transform(translateY($translateY-distance));
|
9
|
+
}
|
10
|
+
}
|
11
|
+
|
12
|
+
@mixin fadeOutDown($duration: 1s, $delay: 0s, $fill-mode: forwards) {
|
13
|
+
@include animation(fadeOutDown $duration $delay $fill-mode);
|
14
|
+
}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
@include keyframes(fadeOutLeft) {
|
2
|
+
0% {
|
3
|
+
opacity: 1;
|
4
|
+
}
|
5
|
+
100% {
|
6
|
+
opacity: 0;
|
7
|
+
@include transform(translateX($translateX-distance * -1) translateZ(0));
|
8
|
+
}
|
9
|
+
}
|
10
|
+
|
11
|
+
@mixin fadeOutLeft($duration: 1s, $delay: 0s, $fill-mode: forwards) {
|
12
|
+
@include animation(fadeOutLeft $duration $delay $fill-mode);
|
13
|
+
}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
@include keyframes(fadeOutRight) {
|
2
|
+
0% {
|
3
|
+
opacity: 1;
|
4
|
+
}
|
5
|
+
100% {
|
6
|
+
opacity: 0;
|
7
|
+
@include transform(translateX($translateX-distance) translateZ(0));
|
8
|
+
}
|
9
|
+
}
|
10
|
+
|
11
|
+
@mixin fadeOutRight($duration: 1s, $delay: 0s, $fill-mode: forwards) {
|
12
|
+
@include animation(fadeOutRight $duration $delay $fill-mode);
|
13
|
+
}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
@include keyframes(fadeOutUp) {
|
2
|
+
0% {
|
3
|
+
opacity: 1;
|
4
|
+
@include transform(translateZ(0));
|
5
|
+
}
|
6
|
+
100% {
|
7
|
+
opacity: 0;
|
8
|
+
@include transform(translateY($translateY-distance * -1));
|
9
|
+
}
|
10
|
+
}
|
11
|
+
|
12
|
+
@mixin fadeOutUp($duration: 1s, $delay: 0s, $fill-mode: forwards) {
|
13
|
+
@include animation(fadeOutUp $duration $delay $fill-mode);
|
14
|
+
}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
@include keyframes(fadeOutZoomBig) {
|
2
|
+
0% {
|
3
|
+
@include transform(scale(1) translateZ(0));
|
4
|
+
}
|
5
|
+
40% {
|
6
|
+
@include transform(scale(1.25));
|
7
|
+
}
|
8
|
+
60% {
|
9
|
+
opacity: 1;
|
10
|
+
}
|
11
|
+
100% {
|
12
|
+
opacity: 0;
|
13
|
+
@include transform(scale(0));
|
14
|
+
}
|
15
|
+
}
|
16
|
+
|
17
|
+
@mixin fadeOutZoomBig($duration: 1s, $delay: 0s, $fill-mode: forwards) {
|
18
|
+
@include animation(fadeOutZoomBig $duration $delay $fill-mode);
|
19
|
+
}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
@include keyframes(fadeOutZoom) {
|
2
|
+
0% {
|
3
|
+
opacity: 1;
|
4
|
+
@include transform(translateZ(0));
|
5
|
+
}
|
6
|
+
100% {
|
7
|
+
opacity: 0;
|
8
|
+
@include transform(scale(0));
|
9
|
+
}
|
10
|
+
}
|
11
|
+
|
12
|
+
@mixin fadeOutZoom($duration: 1s, $delay: 0s, $fill-mode: forwards) {
|
13
|
+
@include animation(fadeOutZoom $duration $delay $fill-mode);
|
14
|
+
}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
@include keyframes(fadeOut) {
|
2
|
+
0% {
|
3
|
+
opacity: 1;
|
4
|
+
@include transform(translateZ(0));
|
5
|
+
}
|
6
|
+
100% {
|
7
|
+
opacity: 0;
|
8
|
+
}
|
9
|
+
}
|
10
|
+
|
11
|
+
@mixin fadeOut($duration: 1s, $delay: 0s, $fill-mode: forwards) {
|
12
|
+
@include animation(fadeOut $duration $delay $fill-mode);
|
13
|
+
}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
@include keyframes(poof) {
|
2
|
+
0% {
|
3
|
+
opacity: 1;
|
4
|
+
@include transform(scale(1) translateZ(0));
|
5
|
+
-webkit-filter: blur(0);
|
6
|
+
}
|
7
|
+
|
8
|
+
100% {
|
9
|
+
opacity: 0;
|
10
|
+
@include transform(scale(2));
|
11
|
+
-webkit-filter: blur(40px);
|
12
|
+
}
|
13
|
+
}
|
14
|
+
|
15
|
+
@mixin poof($duration: 0.75s, $delay: 0s, $fill-mode: forwards) {
|
16
|
+
@include animation(poof $duration $delay $fill-mode);
|
17
|
+
}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
@include keyframes(riseOut) {
|
2
|
+
0% {
|
3
|
+
opacity: 1;
|
4
|
+
@include transform(translateZ(0));
|
5
|
+
}
|
6
|
+
100% {
|
7
|
+
opacity: 0;
|
8
|
+
@include transform(translateY($drop-rise-distance * -1));
|
9
|
+
}
|
10
|
+
}
|
11
|
+
|
12
|
+
@mixin riseOut($duration: 0.5s, $delay: 0s, $fill-mode: forwards) {
|
13
|
+
@include animation(riseOut $duration $delay $fill-mode);
|
14
|
+
}
|
@@ -0,0 +1,29 @@
|
|
1
|
+
@include keyframes(slideOutLeft) {
|
2
|
+
35% {
|
3
|
+
opacity: 1;
|
4
|
+
@include transform(translateX($translateX-distance) translateZ(0));
|
5
|
+
}
|
6
|
+
100% {
|
7
|
+
opacity: 0;
|
8
|
+
@include transform(translateX($translateX-distance * -10));
|
9
|
+
}
|
10
|
+
}
|
11
|
+
|
12
|
+
@mixin slideOutLeft($duration: 1s, $delay: 0s, $fill-mode: forwards) {
|
13
|
+
@include animation(slideOutLeft $duration $delay $fill-mode);
|
14
|
+
}
|
15
|
+
|
16
|
+
@include keyframes(slideOutRight) {
|
17
|
+
35% {
|
18
|
+
opacity: 1;
|
19
|
+
@include transform(translateX($translateX-distance * -1) translateZ(0));
|
20
|
+
}
|
21
|
+
100% {
|
22
|
+
opacity: 0;
|
23
|
+
@include transform(translateX($translateX-distance * 10));
|
24
|
+
}
|
25
|
+
}
|
26
|
+
|
27
|
+
@mixin slideOutRight($duration: 1s, $delay: 0s, $fill-mode: forwards) {
|
28
|
+
@include animation(slideOutRight $duration $delay $fill-mode);
|
29
|
+
}
|
@@ -0,0 +1,33 @@
|
|
1
|
+
@include keyframes(turnOutDown) {
|
2
|
+
0% {
|
3
|
+
opacity: 1;
|
4
|
+
@include transform(perspective(800px) rotateX(0deg) translateZ(0));
|
5
|
+
@include prefix(backface-visibility, hidden, webkit spec);
|
6
|
+
}
|
7
|
+
|
8
|
+
100% {
|
9
|
+
opacity: 0;
|
10
|
+
@include transform(perspective(500px) rotateX($turn-angle * -1) translateZ(150px));
|
11
|
+
}
|
12
|
+
}
|
13
|
+
|
14
|
+
@mixin turnOutDown($duration: 1s, $delay: 0s, $fill-mode: forwards) {
|
15
|
+
@include animation(turnOutDown $duration $delay $fill-mode);
|
16
|
+
}
|
17
|
+
|
18
|
+
@include keyframes(turnOutUp) {
|
19
|
+
0% {
|
20
|
+
opacity: 1;
|
21
|
+
@include transform(perspective(800px) rotateX(0deg) translateZ(0));
|
22
|
+
@include prefix(backface-visibility, hidden, webkit spec);
|
23
|
+
}
|
24
|
+
|
25
|
+
100% {
|
26
|
+
opacity: 0;
|
27
|
+
@include transform(perspective(500px) rotateX($turn-angle) translateZ(150px));
|
28
|
+
}
|
29
|
+
}
|
30
|
+
|
31
|
+
@mixin turnOutUp($duration: 1s, $delay: 0s, $fill-mode: forwards) {
|
32
|
+
@include animation(turnOutUp $duration $delay $fill-mode);
|
33
|
+
}
|
@@ -0,0 +1,25 @@
|
|
1
|
+
@mixin keyframes($name) {
|
2
|
+
@each $prefix in $prefixes {
|
3
|
+
@if $prefix == "webkit" {
|
4
|
+
@-webkit-keyframes #{$name} {
|
5
|
+
@include prefix-only($prefix);
|
6
|
+
@content;
|
7
|
+
}
|
8
|
+
} @else if $prefix == "moz" {
|
9
|
+
@-moz-keyframes #{$name} {
|
10
|
+
@include prefix-only($prefix);
|
11
|
+
@content;
|
12
|
+
}
|
13
|
+
} @else if $prefix == "o" {
|
14
|
+
@-o-keyframes #{$name} {
|
15
|
+
@include prefix-only($prefix);
|
16
|
+
@content;
|
17
|
+
}
|
18
|
+
} @else if $prefix == "spec" {
|
19
|
+
@keyframes #{$name} {
|
20
|
+
@include prefix-all();
|
21
|
+
@content;
|
22
|
+
}
|
23
|
+
}
|
24
|
+
}
|
25
|
+
}
|
@@ -0,0 +1,39 @@
|
|
1
|
+
@mixin prefix($property, $value, $prefixes: $prefixes) {
|
2
|
+
@each $prefix in $prefixes {
|
3
|
+
@if $prefix == "webkit" {
|
4
|
+
-webkit-#{$property}: #{$value};
|
5
|
+
} @else if $prefix == "moz" {
|
6
|
+
-moz-#{$property}: #{$value};
|
7
|
+
} @else if $prefix == "o" {
|
8
|
+
-o-#{$property}: #{$value};
|
9
|
+
} @else if $prefix == "ms" {
|
10
|
+
-ms-#{$property}: #{$value};
|
11
|
+
} @else if $prefix == "spec" {
|
12
|
+
#{$property}: #{$value};
|
13
|
+
} @else {
|
14
|
+
@warn "Unknown prefix: #{$prefix}";
|
15
|
+
}
|
16
|
+
}
|
17
|
+
}
|
18
|
+
|
19
|
+
@mixin prefix-all($value: true){
|
20
|
+
@if $value {
|
21
|
+
$prefixes: ("webkit", "moz", "o", "ms", "spec");
|
22
|
+
} @else {
|
23
|
+
$prefixes: ("spec");
|
24
|
+
}
|
25
|
+
}
|
26
|
+
|
27
|
+
@mixin prefix-only($only) {
|
28
|
+
@if $only == "webkit" {
|
29
|
+
$prefixes: ("webkit", "spec");
|
30
|
+
} @else if $only == "moz" {
|
31
|
+
$prefixes: ("moz", "spec");
|
32
|
+
} @else if $only == "o" {
|
33
|
+
$prefixes: ("o", "spec");
|
34
|
+
} @else if $only == "ms" {
|
35
|
+
$prefixes: ("ms", "spec");
|
36
|
+
} @else {
|
37
|
+
@warn "Unknown prefix: #{$only}";
|
38
|
+
}
|
39
|
+
}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
@mixin transform($property: none) {
|
2
|
+
@if contains($prefixes, "webkit") and contains($prefixes, "ms") {
|
3
|
+
@include prefix(transform, $property, webkit ms spec);
|
4
|
+
} @else if contains($prefixes, "webkit") {
|
5
|
+
@include prefix(transform, $property, webkit spec);
|
6
|
+
} @else {
|
7
|
+
@include prefix(transform, $property, spec);
|
8
|
+
}
|
9
|
+
}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
@include keyframes(aroundTheWorld) {
|
2
|
+
0% {
|
3
|
+
@include transform(rotate(0deg) translate3d($distance-from-origin * -1, $distance-from-origin * -1, 0) rotate(0deg));
|
4
|
+
}
|
5
|
+
100% {
|
6
|
+
@include transform(rotate(360deg) translate3d($distance-from-origin * -1, $distance-from-origin * -1, 0) rotate(-360deg));
|
7
|
+
}
|
8
|
+
}
|
9
|
+
|
10
|
+
@mixin aroundTheWorld($duration: 2s, $delay: 0s, $fill-mode: none, $count: infinite, $timing: ease-in-out) {
|
11
|
+
@include animation(aroundTheWorld $count $duration $delay $fill-mode $timing);
|
12
|
+
}
|
@@ -0,0 +1,24 @@
|
|
1
|
+
@include keyframes(bounce) {
|
2
|
+
0%, 85%, 100% {
|
3
|
+
@include transform(translateY(0) scaleY(1) scaleX(1) translateZ(0));
|
4
|
+
}
|
5
|
+
25% {
|
6
|
+
@include transform(translateY(-1.35rem) scaleY(1.02) scaleX(0.98));
|
7
|
+
}
|
8
|
+
35% {
|
9
|
+
@include transform(translateY(0) scaleY(0.98) scaleX(1.02));
|
10
|
+
}
|
11
|
+
50% {
|
12
|
+
@include transform(translateY(-1rem) scaleY(1.01) scaleX(0.99));
|
13
|
+
}
|
14
|
+
60% {
|
15
|
+
@include transform(translateY(0) scaleY(0.99) scaleX(1.01));
|
16
|
+
}
|
17
|
+
75% {
|
18
|
+
@include transform(translateY(-0.05rem));
|
19
|
+
}
|
20
|
+
}
|
21
|
+
|
22
|
+
@mixin bounce($duration: 1s, $delay: 0s, $count: 1, $fill-mode: none) {
|
23
|
+
@include animation(bounce $count $duration $delay $fill-mode);
|
24
|
+
}
|
@@ -0,0 +1,23 @@
|
|
1
|
+
@mixin backgroundColor($from, $to, $selector: ":hover", $duration: 1.5s, $delay: 0s) {
|
2
|
+
background-color: $from;
|
3
|
+
@include transition(background-color $duration $delay);
|
4
|
+
&#{$selector} {
|
5
|
+
background-color: $to;
|
6
|
+
}
|
7
|
+
}
|
8
|
+
|
9
|
+
@mixin borderColor($from, $to, $selector: ":hover", $duration: 1.5s, $delay: 0s) {
|
10
|
+
border-color: $from;
|
11
|
+
@include transition(border-color $duration $delay);
|
12
|
+
&#{$selector} {
|
13
|
+
border-color: $to;
|
14
|
+
}
|
15
|
+
}
|
16
|
+
|
17
|
+
@mixin color($from, $to, $selector: ":hover", $duration: 1.5s, $delay: 0s) {
|
18
|
+
color: $from;
|
19
|
+
@include transition(color $duration $delay);
|
20
|
+
&#{$selector} {
|
21
|
+
color: $to;
|
22
|
+
}
|
23
|
+
}
|
@@ -0,0 +1,7 @@
|
|
1
|
+
@mixin contract($selector: ":hover", $duration: 0.5s, $delay: 0s, $timing: cubic-bezier(1.000, -0.600, 0.595, 0.835)) {
|
2
|
+
@include transition(all $duration $delay $timing);
|
3
|
+
@include transform(translateY(0) scale(1) translateZ(0));
|
4
|
+
&#{$selector} {
|
5
|
+
@include transform(translateY($enlarge-contract-jump) scale(1 / $enlarge-contract-multiple));
|
6
|
+
}
|
7
|
+
}
|
@@ -0,0 +1,55 @@
|
|
1
|
+
@mixin cubeFlipUp($selector: ".flipUp", $duration: 0.5s, $delay: 0s, $timing: cubic-bezier(0.905, -0.190, 0.480, 0.995)) {
|
2
|
+
position: relative;
|
3
|
+
@include prefix(transform-style, preserve-3d, webkit spec);
|
4
|
+
@include transition(all $duration $delay $timing);
|
5
|
+
&#{$selector} {
|
6
|
+
@include transform(rotateX(-90deg) translateY(100%) translateZ(0));
|
7
|
+
@include prefix(transform-origin, 50% 100%, webkit moz spec);
|
8
|
+
}
|
9
|
+
&::before,
|
10
|
+
&::after {
|
11
|
+
content: '';
|
12
|
+
position: absolute;
|
13
|
+
left: 0;
|
14
|
+
height: 100%;
|
15
|
+
width: 100%;
|
16
|
+
}
|
17
|
+
&::before {
|
18
|
+
top: 100%;
|
19
|
+
@include transform(rotateX(-90deg));
|
20
|
+
@include prefix(transform-origin, 0 0, webkit moz spec);
|
21
|
+
}
|
22
|
+
&::after {
|
23
|
+
top: -100%;
|
24
|
+
@include transform(rotateX(90deg));
|
25
|
+
@include prefix(transform-origin, 0 100%, webkit moz spec);
|
26
|
+
}
|
27
|
+
}
|
28
|
+
|
29
|
+
@mixin cubeFlipDown($selector: ".flipDown", $duration: 0.5s, $delay: 0s, $timing: cubic-bezier(0.905, -0.190, 0.480, 0.995)) {
|
30
|
+
position: relative;
|
31
|
+
@include prefix(transform-style, preserve-3d, webkit spec);
|
32
|
+
@include transition(all $duration $delay $timing);
|
33
|
+
&#{$selector} {
|
34
|
+
@include transform(rotateX(90deg) translateY(-100%) translateZ(0));
|
35
|
+
@include prefix(transform-origin, 50% 0, webkit moz spec);
|
36
|
+
}
|
37
|
+
&::before,
|
38
|
+
&::after {
|
39
|
+
content: '';
|
40
|
+
position: absolute;
|
41
|
+
left: 0;
|
42
|
+
height: 100%;
|
43
|
+
width: 100%;
|
44
|
+
}
|
45
|
+
&::before {
|
46
|
+
top: 100%;
|
47
|
+
@include transform(rotateX(-90deg));
|
48
|
+
@include prefix(transform-origin, 0 0, webkit moz spec);
|
49
|
+
}
|
50
|
+
&::after {
|
51
|
+
top: -100%;
|
52
|
+
@include transform(rotateX(90deg));
|
53
|
+
@include prefix(transform-origin, 0 100%, webkit moz spec);
|
54
|
+
}
|
55
|
+
}
|