saffron 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (135) hide show
  1. data/.gitignore +5 -0
  2. data/.travis.yml +5 -0
  3. data/Gemfile +4 -0
  4. data/Gemfile.lock +43 -0
  5. data/MIT +21 -0
  6. data/README.md +63 -0
  7. data/Rakefile +16 -0
  8. data/app/assets/stylesheets/_variables.scss +18 -0
  9. data/app/assets/stylesheets/entrances/_drop-in.scss +19 -0
  10. data/app/assets/stylesheets/entrances/_fade-in-down.scss +13 -0
  11. data/app/assets/stylesheets/entrances/_fade-in-left.scss +13 -0
  12. data/app/assets/stylesheets/entrances/_fade-in-right.scss +13 -0
  13. data/app/assets/stylesheets/entrances/_fade-in-up.scss +13 -0
  14. data/app/assets/stylesheets/entrances/_fade-in-zoom-big.scss +20 -0
  15. data/app/assets/stylesheets/entrances/_fade-in-zoom.scss +14 -0
  16. data/app/assets/stylesheets/entrances/_fade-in.scss +13 -0
  17. data/app/assets/stylesheets/entrances/_newspaper.scss +14 -0
  18. data/app/assets/stylesheets/entrances/_pop-in.scss +14 -0
  19. data/app/assets/stylesheets/entrances/_rise-in.scss +13 -0
  20. data/app/assets/stylesheets/entrances/_slide-in.scss +35 -0
  21. data/app/assets/stylesheets/entrances/_stretch.scss +33 -0
  22. data/app/assets/stylesheets/entrances/_turn-in.scss +31 -0
  23. data/app/assets/stylesheets/exits/_compress.scss +25 -0
  24. data/app/assets/stylesheets/exits/_drop-out.scss +14 -0
  25. data/app/assets/stylesheets/exits/_explode.scss +14 -0
  26. data/app/assets/stylesheets/exits/_fade-out-down.scss +14 -0
  27. data/app/assets/stylesheets/exits/_fade-out-left.scss +13 -0
  28. data/app/assets/stylesheets/exits/_fade-out-right.scss +13 -0
  29. data/app/assets/stylesheets/exits/_fade-out-up.scss +14 -0
  30. data/app/assets/stylesheets/exits/_fade-out-zoom-big.scss +19 -0
  31. data/app/assets/stylesheets/exits/_fade-out-zoom.scss +14 -0
  32. data/app/assets/stylesheets/exits/_fade-out.scss +13 -0
  33. data/app/assets/stylesheets/exits/_poof.scss +17 -0
  34. data/app/assets/stylesheets/exits/_rise-out.scss +14 -0
  35. data/app/assets/stylesheets/exits/_slide-out.scss +29 -0
  36. data/app/assets/stylesheets/exits/_turn-out.scss +33 -0
  37. data/app/assets/stylesheets/helpers/_animation.scss +3 -0
  38. data/app/assets/stylesheets/helpers/_contains.scss +4 -0
  39. data/app/assets/stylesheets/helpers/_keyframes.scss +25 -0
  40. data/app/assets/stylesheets/helpers/_prefix.scss +39 -0
  41. data/app/assets/stylesheets/helpers/_transform.scss +9 -0
  42. data/app/assets/stylesheets/helpers/_transition.scss +7 -0
  43. data/app/assets/stylesheets/in-place/_around-the-world.scss +12 -0
  44. data/app/assets/stylesheets/in-place/_bounce.scss +24 -0
  45. data/app/assets/stylesheets/in-place/_colors.scss +23 -0
  46. data/app/assets/stylesheets/in-place/_contract.scss +7 -0
  47. data/app/assets/stylesheets/in-place/_cube-flip.scss +55 -0
  48. data/app/assets/stylesheets/in-place/_enlarge.scss +7 -0
  49. data/app/assets/stylesheets/in-place/_expand.scss +6 -0
  50. data/app/assets/stylesheets/in-place/_flip.scss +19 -0
  51. data/app/assets/stylesheets/in-place/_float.scss +17 -0
  52. data/app/assets/stylesheets/in-place/_ping.scss +13 -0
  53. data/app/assets/stylesheets/in-place/_pulsate.scss +14 -0
  54. data/app/assets/stylesheets/in-place/_quiver.scss +42 -0
  55. data/app/assets/stylesheets/in-place/_shake.scss +24 -0
  56. data/app/assets/stylesheets/in-place/_spin.scss +12 -0
  57. data/app/assets/stylesheets/in-place/_square-dance.scss +18 -0
  58. data/app/assets/stylesheets/in-place/_sunrise.scss +12 -0
  59. data/app/assets/stylesheets/in-place/_sway.scss +17 -0
  60. data/app/assets/stylesheets/in-place/_teeter.scss +29 -0
  61. data/app/assets/stylesheets/saffron.scss +62 -0
  62. data/bin/saffron +9 -0
  63. data/features/install.feature +28 -0
  64. data/features/step_definitions/saffron.rb +37 -0
  65. data/features/support/env.rb +1 -0
  66. data/features/update.feature +37 -0
  67. data/features/version.feature +10 -0
  68. data/lib/saffron.rb +13 -0
  69. data/lib/saffron/engine.rb +4 -0
  70. data/lib/saffron/installer.rb +55 -0
  71. data/lib/saffron/version.rb +3 -0
  72. data/saffron.gemspec +31 -0
  73. data/saffron/_variables.scss +18 -0
  74. data/saffron/entrances/_drop-in.scss +19 -0
  75. data/saffron/entrances/_fade-in-down.scss +13 -0
  76. data/saffron/entrances/_fade-in-left.scss +13 -0
  77. data/saffron/entrances/_fade-in-right.scss +13 -0
  78. data/saffron/entrances/_fade-in-up.scss +13 -0
  79. data/saffron/entrances/_fade-in-zoom-big.scss +20 -0
  80. data/saffron/entrances/_fade-in-zoom.scss +14 -0
  81. data/saffron/entrances/_fade-in.scss +13 -0
  82. data/saffron/entrances/_newspaper.scss +14 -0
  83. data/saffron/entrances/_pop-in.scss +14 -0
  84. data/saffron/entrances/_rise-in.scss +13 -0
  85. data/saffron/entrances/_slide-in.scss +35 -0
  86. data/saffron/entrances/_stretch.scss +33 -0
  87. data/saffron/entrances/_turn-in.scss +31 -0
  88. data/saffron/exits/_compress.scss +25 -0
  89. data/saffron/exits/_drop-out.scss +14 -0
  90. data/saffron/exits/_explode.scss +14 -0
  91. data/saffron/exits/_fade-out-down.scss +14 -0
  92. data/saffron/exits/_fade-out-left.scss +13 -0
  93. data/saffron/exits/_fade-out-right.scss +13 -0
  94. data/saffron/exits/_fade-out-up.scss +14 -0
  95. data/saffron/exits/_fade-out-zoom-big.scss +19 -0
  96. data/saffron/exits/_fade-out-zoom.scss +14 -0
  97. data/saffron/exits/_fade-out.scss +13 -0
  98. data/saffron/exits/_poof.scss +17 -0
  99. data/saffron/exits/_rise-out.scss +14 -0
  100. data/saffron/exits/_slide-out.scss +29 -0
  101. data/saffron/exits/_turn-out.scss +33 -0
  102. data/saffron/helpers/_animation.scss +3 -0
  103. data/saffron/helpers/_contains.scss +4 -0
  104. data/saffron/helpers/_keyframes.scss +25 -0
  105. data/saffron/helpers/_prefix.scss +39 -0
  106. data/saffron/helpers/_transform.scss +9 -0
  107. data/saffron/helpers/_transition.scss +7 -0
  108. data/saffron/in-place/_around-the-world.scss +12 -0
  109. data/saffron/in-place/_bounce.scss +24 -0
  110. data/saffron/in-place/_colors.scss +23 -0
  111. data/saffron/in-place/_contract.scss +7 -0
  112. data/saffron/in-place/_cube-flip.scss +55 -0
  113. data/saffron/in-place/_enlarge.scss +7 -0
  114. data/saffron/in-place/_expand.scss +6 -0
  115. data/saffron/in-place/_flip.scss +19 -0
  116. data/saffron/in-place/_float.scss +17 -0
  117. data/saffron/in-place/_ping.scss +13 -0
  118. data/saffron/in-place/_pulsate.scss +14 -0
  119. data/saffron/in-place/_quiver.scss +42 -0
  120. data/saffron/in-place/_shake.scss +24 -0
  121. data/saffron/in-place/_spin.scss +12 -0
  122. data/saffron/in-place/_square-dance.scss +18 -0
  123. data/saffron/in-place/_sunrise.scss +12 -0
  124. data/saffron/in-place/_sway.scss +17 -0
  125. data/saffron/in-place/_teeter.scss +29 -0
  126. data/saffron/saffron.scss +62 -0
  127. data/tasks/.csscomb.json +297 -0
  128. data/tasks/.csslintrc +19 -0
  129. data/tasks/Gruntfile.js +111 -0
  130. data/tasks/compiled/index.html +11 -0
  131. data/tasks/compiled/saffron.css +3049 -0
  132. data/tasks/compiled/test.css +3086 -0
  133. data/tasks/package.json +32 -0
  134. data/tasks/test.scss +13 -0
  135. metadata +278 -0
@@ -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,3 @@
1
+ @mixin animation($properties...) {
2
+ @include prefix(animation, $properties, webkit spec);
3
+ }
@@ -0,0 +1,4 @@
1
+ // Thanks to @lunelson and @zaus
2
+ @function contains($list, $var) {
3
+ @return (false != index($list, $var));
4
+ }
@@ -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,7 @@
1
+ @mixin transition ($properties...) {
2
+ @if contains($prefixes, "webkit") {
3
+ @include prefix(transition, $properties, webkit spec);
4
+ } @else {
5
+ @include prefix(transition, $properties, spec);
6
+ }
7
+ }
@@ -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
+ }