saffron 0.2.0 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- data/.travis.yml +2 -4
- data/Gemfile.lock +1 -1
- data/README.md +3 -0
- data/app/assets/stylesheets/_variables.scss +18 -18
- data/app/assets/stylesheets/entrances/_drop-in.scss +2 -2
- data/app/assets/stylesheets/entrances/_fade-in-down.scss +1 -1
- data/app/assets/stylesheets/entrances/_fade-in-left.scss +1 -1
- data/app/assets/stylesheets/entrances/_fade-in-right.scss +1 -1
- data/app/assets/stylesheets/entrances/_fade-in-up.scss +1 -1
- data/app/assets/stylesheets/entrances/_fade-in-zoom-big.scss +1 -1
- data/app/assets/stylesheets/entrances/_rise-in.scss +1 -1
- data/app/assets/stylesheets/entrances/_slide-in.scss +4 -4
- data/app/assets/stylesheets/entrances/_stretch.scss +6 -6
- data/app/assets/stylesheets/entrances/_turn-in.scss +8 -8
- data/app/assets/stylesheets/exits/_compress.scss +2 -2
- data/app/assets/stylesheets/exits/_drop-out.scss +1 -1
- data/app/assets/stylesheets/exits/_fade-out-down.scss +1 -1
- data/app/assets/stylesheets/exits/_fade-out-left.scss +1 -1
- data/app/assets/stylesheets/exits/_fade-out-right.scss +1 -1
- data/app/assets/stylesheets/exits/_fade-out-up.scss +1 -1
- data/app/assets/stylesheets/exits/_poof.scss +2 -2
- data/app/assets/stylesheets/exits/_rise-out.scss +1 -1
- data/app/assets/stylesheets/exits/_slide-out.scss +4 -4
- data/app/assets/stylesheets/exits/_turn-out.scss +2 -2
- data/app/assets/stylesheets/helpers/_keyframes.scss +1 -1
- data/app/assets/stylesheets/helpers/_prefix.scss +1 -1
- data/app/assets/stylesheets/helpers/_transform.scss +2 -2
- data/app/assets/stylesheets/helpers/_transition.scss +1 -1
- data/app/assets/stylesheets/in-place/_around-the-world.scss +2 -2
- data/app/assets/stylesheets/in-place/_contract.scss +1 -2
- data/app/assets/stylesheets/in-place/_enlarge.scss +1 -2
- data/app/assets/stylesheets/in-place/_float.scss +3 -3
- data/app/assets/stylesheets/in-place/_pulsate.scss +1 -1
- data/app/assets/stylesheets/in-place/_quiver.scss +7 -7
- data/app/assets/stylesheets/in-place/_shake.scss +5 -5
- data/app/assets/stylesheets/in-place/_sunrise.scss +3 -3
- data/app/assets/stylesheets/in-place/_sway.scss +3 -3
- data/app/assets/stylesheets/in-place/_teeter.scss +6 -6
- data/bower.json +29 -0
- data/features/install.feature +0 -1
- data/features/update.feature +0 -1
- data/features/version.feature +0 -1
- data/lib/saffron/version.rb +1 -1
- data/sache.json +5 -0
- data/saffron/_variables.scss +18 -18
- data/saffron/entrances/_drop-in.scss +2 -2
- data/saffron/entrances/_fade-in-down.scss +1 -1
- data/saffron/entrances/_fade-in-left.scss +1 -1
- data/saffron/entrances/_fade-in-right.scss +1 -1
- data/saffron/entrances/_fade-in-up.scss +1 -1
- data/saffron/entrances/_fade-in-zoom-big.scss +1 -1
- data/saffron/entrances/_rise-in.scss +1 -1
- data/saffron/entrances/_slide-in.scss +4 -4
- data/saffron/entrances/_stretch.scss +6 -6
- data/saffron/entrances/_turn-in.scss +8 -8
- data/saffron/exits/_compress.scss +2 -2
- data/saffron/exits/_drop-out.scss +1 -1
- data/saffron/exits/_fade-out-down.scss +1 -1
- data/saffron/exits/_fade-out-left.scss +1 -1
- data/saffron/exits/_fade-out-right.scss +1 -1
- data/saffron/exits/_fade-out-up.scss +1 -1
- data/saffron/exits/_poof.scss +2 -2
- data/saffron/exits/_rise-out.scss +1 -1
- data/saffron/exits/_slide-out.scss +4 -4
- data/saffron/exits/_turn-out.scss +2 -2
- data/saffron/helpers/_keyframes.scss +1 -1
- data/saffron/helpers/_prefix.scss +1 -1
- data/saffron/helpers/_transform.scss +2 -2
- data/saffron/helpers/_transition.scss +1 -1
- data/saffron/in-place/_around-the-world.scss +2 -2
- data/saffron/in-place/_contract.scss +1 -2
- data/saffron/in-place/_enlarge.scss +1 -2
- data/saffron/in-place/_float.scss +3 -3
- data/saffron/in-place/_pulsate.scss +1 -1
- data/saffron/in-place/_quiver.scss +7 -7
- data/saffron/in-place/_shake.scss +5 -5
- data/saffron/in-place/_sunrise.scss +3 -3
- data/saffron/in-place/_sway.scss +3 -3
- data/saffron/in-place/_teeter.scss +6 -6
- data/tasks/compiled/saffron.css +850 -260
- data/tasks/compiled/test.css +853 -288
- data/tasks/package.json +2 -2
- data/tasks/test.scss +1 -1
- metadata +6 -4
data/.travis.yml
CHANGED
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -1,4 +1,7 @@
|
|
1
1
|
#Saffron
|
2
|
+
[![Build Status](https://travis-ci.org/corporadobob/saffron.svg?branch=master)](https://travis-ci.org/corporadobob/saffron)
|
3
|
+
[![Gem Version](https://badge.fury.io/rb/saffron.svg)](http://badge.fury.io/rb/saffron)
|
4
|
+
|
2
5
|
> A simple sass mixin library for animations and transitions.
|
3
6
|
|
4
7
|
Saffron is a collection of sass mixins and helpers that make adding CSS3 animations and transitions much simpler.
|
@@ -1,18 +1,18 @@
|
|
1
|
-
$prefixes: ("webkit", "moz", "o", "ms", "spec") !default;
|
2
|
-
$translateY-distance: 1.334em !default;
|
3
|
-
$translateX-distance: 1.334em !default;
|
4
|
-
$drop-rise-distance: 10em !default;
|
5
|
-
$shake-distance: 0.55em !default;
|
6
|
-
$teeter-angle: 10deg !default;
|
7
|
-
$quiver-angle: 2deg !default;
|
8
|
-
$float-bob-distance: 0.25em !default;
|
9
|
-
$float-bob-angle: 1deg !default;
|
10
|
-
$sway-angle: 3deg !default;
|
11
|
-
$turn-angle: 225deg !default;
|
12
|
-
$pulsate-scale: 1.1 !default;
|
13
|
-
$stretch-compress-exageration: 1.05 !default;
|
14
|
-
$distance-from-origin: 5em !default;
|
15
|
-
$sunrise-arch: -15em !default;
|
16
|
-
$enlarge-contract-multiple: 1.15 !default;
|
17
|
-
$enlarge-contract-jump: 1em !default;
|
18
|
-
$flip-scale: 1.2 !default;
|
1
|
+
$saf-prefixes: ("webkit", "moz", "o", "ms", "spec") !default;
|
2
|
+
$saf-translateY-distance: 1.334em !default;
|
3
|
+
$saf-translateX-distance: 1.334em !default;
|
4
|
+
$saf-drop-rise-distance: 10em !default;
|
5
|
+
$saf-shake-distance: 0.55em !default;
|
6
|
+
$saf-teeter-angle: 10deg !default;
|
7
|
+
$saf-quiver-angle: 2deg !default;
|
8
|
+
$saf-float-bob-distance: 0.25em !default;
|
9
|
+
$saf-float-bob-angle: 1deg !default;
|
10
|
+
$saf-sway-angle: 3deg !default;
|
11
|
+
$saf-turn-angle: 225deg !default;
|
12
|
+
$saf-pulsate-scale: 1.1 !default;
|
13
|
+
$saf-stretch-compress-exageration: 1.05 !default;
|
14
|
+
$saf-distance-from-origin: 5em !default;
|
15
|
+
$saf-sunrise-arch: -15em !default;
|
16
|
+
$saf-enlarge-contract-multiple: 1.15 !default;
|
17
|
+
$saf-enlarge-contract-jump: 1em !default;
|
18
|
+
$saf-flip-scale: 1.2 !default;
|
@@ -1,10 +1,10 @@
|
|
1
1
|
@include keyframes(dropIn) {
|
2
2
|
0% {
|
3
3
|
opacity: 0;
|
4
|
-
@include transform(translateY($drop-rise-distance * -1) rotate(0) translateZ(0));
|
4
|
+
@include transform(translateY($saf-drop-rise-distance * -1) rotate(0) translateZ(0));
|
5
5
|
}
|
6
6
|
10% {
|
7
|
-
@include transform(translateY($drop-rise-distance * -1) rotate(-40deg));
|
7
|
+
@include transform(translateY($saf-drop-rise-distance * -1) rotate(-40deg));
|
8
8
|
}
|
9
9
|
90% {
|
10
10
|
opacity: 1;
|
@@ -1,11 +1,11 @@
|
|
1
1
|
@include keyframes(slideInLeft) {
|
2
2
|
0% {
|
3
3
|
opacity: 0;
|
4
|
-
@include transform(translateX($translateX-distance * -10) translateZ(0));
|
4
|
+
@include transform(translateX($saf-translateX-distance * -10) translateZ(0));
|
5
5
|
}
|
6
6
|
65% {
|
7
7
|
opacity: 1;
|
8
|
-
@include transform(translateX($translateX-distance));
|
8
|
+
@include transform(translateX($saf-translateX-distance));
|
9
9
|
}
|
10
10
|
100% {
|
11
11
|
@include transform(translateX(0));
|
@@ -19,11 +19,11 @@
|
|
19
19
|
@include keyframes(slideInRight) {
|
20
20
|
0% {
|
21
21
|
opacity: 0;
|
22
|
-
@include transform(translateX($translateX-distance * 10) translateZ(0));
|
22
|
+
@include transform(translateX($saf-translateX-distance * 10) translateZ(0));
|
23
23
|
}
|
24
24
|
65% {
|
25
25
|
opacity: 1;
|
26
|
-
@include transform(translateX($translateX-distance * -1));
|
26
|
+
@include transform(translateX($saf-translateX-distance * -1));
|
27
27
|
}
|
28
28
|
100% {
|
29
29
|
@include transform(translateX(0));
|
@@ -1,21 +1,21 @@
|
|
1
1
|
@include keyframes(stretch) {
|
2
2
|
0% {
|
3
|
-
@include transform(scaleY(0)
|
3
|
+
@include transform(scaleY(0));
|
4
4
|
}
|
5
5
|
40% {
|
6
|
-
@include transform(scaleY($stretch-compress-exageration));
|
6
|
+
@include transform(scaleY($saf-stretch-compress-exageration));
|
7
7
|
}
|
8
8
|
60% {
|
9
|
-
@include transform(scaleY($stretch-compress-exageration - ($stretch-compress-exageration * .075)));
|
9
|
+
@include transform(scaleY($saf-stretch-compress-exageration - ($saf-stretch-compress-exageration * .075)));
|
10
10
|
}
|
11
11
|
80% {
|
12
|
-
@include transform(scaleY($stretch-compress-exageration));
|
12
|
+
@include transform(scaleY($saf-stretch-compress-exageration));
|
13
13
|
}
|
14
14
|
100% {
|
15
|
-
@include transform(scaleY($stretch-compress-exageration - ($stretch-compress-exageration * .075)));
|
15
|
+
@include transform(scaleY($saf-stretch-compress-exageration - ($saf-stretch-compress-exageration * .075)));
|
16
16
|
}
|
17
17
|
80% {
|
18
|
-
@include transform(scaleY($stretch-compress-exageration - ($stretch-compress-exageration * .025)));
|
18
|
+
@include transform(scaleY($saf-stretch-compress-exageration - ($saf-stretch-compress-exageration * .025)));
|
19
19
|
}
|
20
20
|
100% {
|
21
21
|
@include transform(scaleY(1));
|
@@ -1,7 +1,7 @@
|
|
1
|
-
@include keyframes(
|
1
|
+
@include keyframes(turnInDown) {
|
2
2
|
0% {
|
3
3
|
opacity: 0;
|
4
|
-
@include transform(perspective(500px) rotateX($turn-angle * -1) translateZ(150px));
|
4
|
+
@include transform(perspective(500px) rotateX($saf-turn-angle * -1) translateZ(150px));
|
5
5
|
}
|
6
6
|
100% {
|
7
7
|
opacity: 1;
|
@@ -10,14 +10,14 @@
|
|
10
10
|
}
|
11
11
|
}
|
12
12
|
|
13
|
-
@mixin
|
14
|
-
@include animation(
|
13
|
+
@mixin turnInDown($duration: 1s, $delay: 0s, $fill-mode: forwards) {
|
14
|
+
@include animation(turnInDown $duration $delay $fill-mode);
|
15
15
|
}
|
16
16
|
|
17
|
-
@include keyframes(
|
17
|
+
@include keyframes(turnInUp) {
|
18
18
|
0% {
|
19
19
|
opacity: 0;
|
20
|
-
@include transform(perspective(500px) rotateX($turn-angle) translateZ(150px));
|
20
|
+
@include transform(perspective(500px) rotateX($saf-turn-angle) translateZ(150px));
|
21
21
|
}
|
22
22
|
100% {
|
23
23
|
opacity: 1;
|
@@ -26,6 +26,6 @@
|
|
26
26
|
}
|
27
27
|
}
|
28
28
|
|
29
|
-
@mixin
|
30
|
-
@include animation(
|
29
|
+
@mixin turnInUp($duration: 1s, $delay: 0s, $fill-mode: forwards) {
|
30
|
+
@include animation(turnInUp $duration $delay $fill-mode);
|
31
31
|
}
|
@@ -3,10 +3,10 @@
|
|
3
3
|
@include transform(scaleY(1) translateZ(0));
|
4
4
|
}
|
5
5
|
30% {
|
6
|
-
@include transform(scaleY($stretch-compress-exageration));
|
6
|
+
@include transform(scaleY($saf-stretch-compress-exageration));
|
7
7
|
}
|
8
8
|
50% {
|
9
|
-
@include transform(scaleY($stretch-compress-exageration - ($stretch-compress-exageration * .075)));
|
9
|
+
@include transform(scaleY($saf-stretch-compress-exageration - ($saf-stretch-compress-exageration * .075)));
|
10
10
|
}
|
11
11
|
100% {
|
12
12
|
@include transform(scaleY(0));
|
@@ -1,7 +1,7 @@
|
|
1
1
|
@include keyframes(poof) {
|
2
2
|
0% {
|
3
3
|
opacity: 1;
|
4
|
-
@include transform(scale(1)
|
4
|
+
@include transform(scale(1));
|
5
5
|
-webkit-filter: blur(0);
|
6
6
|
}
|
7
7
|
|
@@ -12,6 +12,6 @@
|
|
12
12
|
}
|
13
13
|
}
|
14
14
|
|
15
|
-
@mixin poof($duration: 0.
|
15
|
+
@mixin poof($duration: 0.85s, $delay: 0s, $fill-mode: forwards) {
|
16
16
|
@include animation(poof $duration $delay $fill-mode);
|
17
17
|
}
|
@@ -1,11 +1,11 @@
|
|
1
1
|
@include keyframes(slideOutLeft) {
|
2
2
|
35% {
|
3
3
|
opacity: 1;
|
4
|
-
@include transform(translateX($translateX-distance) translateZ(0));
|
4
|
+
@include transform(translateX($saf-translateX-distance) translateZ(0));
|
5
5
|
}
|
6
6
|
100% {
|
7
7
|
opacity: 0;
|
8
|
-
@include transform(translateX($translateX-distance * -10));
|
8
|
+
@include transform(translateX($saf-translateX-distance * -10));
|
9
9
|
}
|
10
10
|
}
|
11
11
|
|
@@ -16,11 +16,11 @@
|
|
16
16
|
@include keyframes(slideOutRight) {
|
17
17
|
35% {
|
18
18
|
opacity: 1;
|
19
|
-
@include transform(translateX($translateX-distance * -1) translateZ(0));
|
19
|
+
@include transform(translateX($saf-translateX-distance * -1) translateZ(0));
|
20
20
|
}
|
21
21
|
100% {
|
22
22
|
opacity: 0;
|
23
|
-
@include transform(translateX($translateX-distance * 10));
|
23
|
+
@include transform(translateX($saf-translateX-distance * 10));
|
24
24
|
}
|
25
25
|
}
|
26
26
|
|
@@ -7,7 +7,7 @@
|
|
7
7
|
|
8
8
|
100% {
|
9
9
|
opacity: 0;
|
10
|
-
@include transform(perspective(500px) rotateX($turn-angle * -1) translateZ(150px));
|
10
|
+
@include transform(perspective(500px) rotateX($saf-turn-angle * -1) translateZ(150px));
|
11
11
|
}
|
12
12
|
}
|
13
13
|
|
@@ -24,7 +24,7 @@
|
|
24
24
|
|
25
25
|
100% {
|
26
26
|
opacity: 0;
|
27
|
-
@include transform(perspective(500px) rotateX($turn-angle) translateZ(150px));
|
27
|
+
@include transform(perspective(500px) rotateX($saf-turn-angle) translateZ(150px));
|
28
28
|
}
|
29
29
|
}
|
30
30
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
@mixin transform($property: none) {
|
2
|
-
@if contains($prefixes, "webkit") and contains($prefixes, "ms") {
|
2
|
+
@if contains($saf-prefixes, "webkit") and contains($saf-prefixes, "ms") {
|
3
3
|
@include prefix(transform, $property, webkit ms spec);
|
4
|
-
} @else if contains($prefixes, "webkit") {
|
4
|
+
} @else if contains($saf-prefixes, "webkit") {
|
5
5
|
@include prefix(transform, $property, webkit spec);
|
6
6
|
} @else {
|
7
7
|
@include prefix(transform, $property, spec);
|
@@ -1,9 +1,9 @@
|
|
1
1
|
@include keyframes(aroundTheWorld) {
|
2
2
|
0% {
|
3
|
-
@include transform(rotate(0deg) translate3d($distance-from-origin * -1, $distance-from-origin * -1, 0) rotate(0deg));
|
3
|
+
@include transform(rotate(0deg) translate3d($saf-distance-from-origin * -1, $saf-distance-from-origin * -1, 0) rotate(0deg));
|
4
4
|
}
|
5
5
|
100% {
|
6
|
-
@include transform(rotate(360deg) translate3d($distance-from-origin * -1, $distance-from-origin * -1, 0) rotate(-360deg));
|
6
|
+
@include transform(rotate(360deg) translate3d($saf-distance-from-origin * -1, $saf-distance-from-origin * -1, 0) rotate(-360deg));
|
7
7
|
}
|
8
8
|
}
|
9
9
|
|
@@ -1,7 +1,6 @@
|
|
1
1
|
@mixin contract($selector: ":hover", $duration: 0.5s, $delay: 0s, $timing: cubic-bezier(1.000, -0.600, 0.595, 0.835)) {
|
2
2
|
@include transition(all $duration $delay $timing);
|
3
|
-
@include transform(translateY(0) scale(1) translateZ(0));
|
4
3
|
&#{$selector} {
|
5
|
-
@include transform(translateY($enlarge-contract-jump) scale(1 / $enlarge-contract-multiple));
|
4
|
+
@include transform(translateY($saf-enlarge-contract-jump) scale(1 / $saf-enlarge-contract-multiple));
|
6
5
|
}
|
7
6
|
}
|
@@ -1,7 +1,6 @@
|
|
1
1
|
@mixin enlarge($selector: ":hover", $duration: 0.5s, $delay: 0s, $timing: cubic-bezier(1.000, -0.600, 0.595, 0.835)) {
|
2
2
|
@include transition(all $duration $delay $timing);
|
3
|
-
@include transform(translateY(0) scale(1) translateZ(0));
|
4
3
|
&#{$selector} {
|
5
|
-
@include transform(translateY($enlarge-contract-jump * -1) scale($enlarge-contract-multiple));
|
4
|
+
@include transform(translateY($saf-enlarge-contract-jump * -1) scale($saf-enlarge-contract-multiple));
|
6
5
|
}
|
7
6
|
}
|
@@ -1,12 +1,12 @@
|
|
1
1
|
@include keyframes(float) {
|
2
2
|
0%, 50%, 100% {
|
3
|
-
@include transform(translateY($float-bob-distance * -1) translateZ(0));
|
3
|
+
@include transform(translateY($saf-float-bob-distance * -1) translateZ(0));
|
4
4
|
}
|
5
5
|
25% {
|
6
|
-
@include transform(translateY($float-bob-distance) rotate($float-bob-angle));
|
6
|
+
@include transform(translateY($saf-float-bob-distance) rotate($saf-float-bob-angle));
|
7
7
|
}
|
8
8
|
75% {
|
9
|
-
@include transform(translateY($float-bob-distance) rotate($float-bob-angle * -1));
|
9
|
+
@include transform(translateY($saf-float-bob-distance) rotate($saf-float-bob-angle * -1));
|
10
10
|
}
|
11
11
|
}
|
12
12
|
|