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
data/lib/saffron.rb
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
require "saffron/installer"
|
2
|
+
require "sass" unless defined? Sass
|
3
|
+
|
4
|
+
module Saffron
|
5
|
+
if defined?(Rails) && defined?(Rails::Engine)
|
6
|
+
class Engine < ::Rails::Engine
|
7
|
+
require "saffron/engine"
|
8
|
+
end
|
9
|
+
else
|
10
|
+
Sass.load_paths << File.expand_path("../saffron", __FILE__)
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
@@ -0,0 +1,55 @@
|
|
1
|
+
require "saffron/version"
|
2
|
+
require "thor"
|
3
|
+
|
4
|
+
module Saffron
|
5
|
+
class Installer < Thor
|
6
|
+
include Thor::Actions
|
7
|
+
source_root File.dirname(__FILE__)
|
8
|
+
map ["--version", "-v"] => :version
|
9
|
+
|
10
|
+
desc "install", "Installs Saffron"
|
11
|
+
method_option :path, :aliases => "-p", :desc => "Set the install path"
|
12
|
+
def install
|
13
|
+
unless File.directory? set_destination
|
14
|
+
install_saffron
|
15
|
+
puts "Saffron succesfully installed in #{@destination}/"
|
16
|
+
else
|
17
|
+
puts "Saffron already exists."
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
desc "update", "Updates Saffron"
|
22
|
+
method_option :path, :aliases => "-p", :desc => "Set the update path"
|
23
|
+
def update
|
24
|
+
if File.directory? set_destination
|
25
|
+
remove_saffron
|
26
|
+
install_saffron
|
27
|
+
puts "Saffron succesfully updated in #{@destination}/"
|
28
|
+
else
|
29
|
+
puts "Saffron not found. No updates occured."
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
desc "version", "Outputs version number"
|
34
|
+
def version
|
35
|
+
say "Saffron #{Saffron::VERSION}"
|
36
|
+
end
|
37
|
+
|
38
|
+
private
|
39
|
+
def set_destination
|
40
|
+
@destination ||= if options[:path]
|
41
|
+
File.join(options[:path], "saffron")
|
42
|
+
else
|
43
|
+
"saffron"
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
def install_saffron
|
48
|
+
directory "../../saffron/", @destination
|
49
|
+
end
|
50
|
+
|
51
|
+
def remove_saffron
|
52
|
+
remove_dir @destination
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
data/saffron.gemspec
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'saffron/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "saffron"
|
8
|
+
spec.version = Saffron::VERSION
|
9
|
+
spec.authors = ["JC"]
|
10
|
+
spec.email = ["j@colindres.me"]
|
11
|
+
spec.summary = "A simple sass mixin library for animations and transitions."
|
12
|
+
spec.homepage = "https://github.com/corporadobob/saffron"
|
13
|
+
spec.license = "MIT"
|
14
|
+
spec.description = <<-DESC
|
15
|
+
Saffron is a collection of sass mixins and helpers that make adding CSS3 animations and transitions much simpler.
|
16
|
+
Just include a mixin in your sass declaration, then set any configuration using variables and mixin parameters.
|
17
|
+
DESC
|
18
|
+
|
19
|
+
|
20
|
+
spec.files = `git ls-files`.split($/)
|
21
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
22
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
23
|
+
spec.require_paths = ["lib"]
|
24
|
+
|
25
|
+
spec.add_dependency "sass", "~> 3.2"
|
26
|
+
spec.add_dependency "thor"
|
27
|
+
|
28
|
+
spec.add_development_dependency "bundler", "~> 1.3"
|
29
|
+
spec.add_development_dependency "rake"
|
30
|
+
spec.add_development_dependency "aruba", "~> 0.5"
|
31
|
+
end
|
@@ -0,0 +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;
|
@@ -0,0 +1,19 @@
|
|
1
|
+
@include keyframes(dropIn) {
|
2
|
+
0% {
|
3
|
+
opacity: 0;
|
4
|
+
@include transform(translateY($drop-rise-distance * -1) rotate(0) translateZ(0));
|
5
|
+
}
|
6
|
+
10% {
|
7
|
+
@include transform(translateY($drop-rise-distance * -1) rotate(-40deg));
|
8
|
+
}
|
9
|
+
90% {
|
10
|
+
opacity: 1;
|
11
|
+
}
|
12
|
+
100% {
|
13
|
+
@include transform(translateY(0) rotate(0));
|
14
|
+
}
|
15
|
+
}
|
16
|
+
|
17
|
+
@mixin dropIn($duration: 0.5s, $delay: 0s, $fill-mode: forwards) {
|
18
|
+
@include animation(dropIn $duration $delay $fill-mode);
|
19
|
+
}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
@include keyframes(fadeInDown) {
|
2
|
+
0% {
|
3
|
+
opacity: 0;
|
4
|
+
@include transform(translateY($translateY-distance * -1) translateZ(0));
|
5
|
+
}
|
6
|
+
100% {
|
7
|
+
opacity: 1;
|
8
|
+
}
|
9
|
+
}
|
10
|
+
|
11
|
+
@mixin fadeInDown($duration: 1s, $delay: 0s, $fill-mode: forwards) {
|
12
|
+
@include animation(fadeInDown $duration $delay $fill-mode);
|
13
|
+
}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
@include keyframes(fadeInLeft) {
|
2
|
+
0% {
|
3
|
+
opacity: 0;
|
4
|
+
@include transform(translateX($translateX-distance * -1) translateZ(0));
|
5
|
+
}
|
6
|
+
100% {
|
7
|
+
opacity: 1;
|
8
|
+
}
|
9
|
+
}
|
10
|
+
|
11
|
+
@mixin fadeInLeft($duration: 1s, $delay: 0s, $fill-mode: forwards) {
|
12
|
+
@include animation(fadeInLeft $duration $delay $fill-mode);
|
13
|
+
}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
@include keyframes(fadeInRight) {
|
2
|
+
0% {
|
3
|
+
opacity: 0;
|
4
|
+
@include transform(translateX($translateX-distance) translateZ(0));
|
5
|
+
}
|
6
|
+
100% {
|
7
|
+
opacity: 1;
|
8
|
+
}
|
9
|
+
}
|
10
|
+
|
11
|
+
@mixin fadeInRight($duration: 1s, $delay: 0s, $fill-mode: forwards) {
|
12
|
+
@include animation(fadeInRight $duration $delay $fill-mode);
|
13
|
+
}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
@include keyframes(fadeInUp) {
|
2
|
+
0% {
|
3
|
+
opacity: 0;
|
4
|
+
@include transform(translateY($translateY-distance) translateZ(0));
|
5
|
+
}
|
6
|
+
100% {
|
7
|
+
opacity: 1;
|
8
|
+
}
|
9
|
+
}
|
10
|
+
|
11
|
+
@mixin fadeInUp($duration: 1s, $delay: 0s, $fill-mode: forwards) {
|
12
|
+
@include animation(fadeInUp $duration $delay $fill-mode);
|
13
|
+
}
|
@@ -0,0 +1,20 @@
|
|
1
|
+
@include keyframes(fadeInZoomBig) {
|
2
|
+
0% {
|
3
|
+
opacity: 0;
|
4
|
+
@include transform(scale(0) translateZ(0));
|
5
|
+
}
|
6
|
+
60% {
|
7
|
+
@include transform(scale(1.25));
|
8
|
+
}
|
9
|
+
80% {
|
10
|
+
@include transform(scale(0.95));
|
11
|
+
}
|
12
|
+
100% {
|
13
|
+
opacity: 1;
|
14
|
+
@include transform(scale(1));
|
15
|
+
}
|
16
|
+
}
|
17
|
+
|
18
|
+
@mixin fadeInZoomBig($duration: 1s, $delay: 0s, $fill-mode: forwards) {
|
19
|
+
@include animation(fadeInZoomBig $duration $delay $fill-mode);
|
20
|
+
}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
@include keyframes(fadeInZoom) {
|
2
|
+
0% {
|
3
|
+
opacity: 0;
|
4
|
+
@include transform(scale(0) translateZ(0));
|
5
|
+
}
|
6
|
+
100% {
|
7
|
+
opacity: 1;
|
8
|
+
@include transform(scale(1));
|
9
|
+
}
|
10
|
+
}
|
11
|
+
|
12
|
+
@mixin fadeInZoom($duration: 1s, $delay: 0s, $fill-mode: forwards) {
|
13
|
+
@include animation(fadeInZoom $duration $delay $fill-mode);
|
14
|
+
}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
@include keyframes(fadeIn) {
|
2
|
+
0% {
|
3
|
+
opacity: 0;
|
4
|
+
@include transform(translateZ(0));
|
5
|
+
}
|
6
|
+
100% {
|
7
|
+
opacity: 1;
|
8
|
+
}
|
9
|
+
}
|
10
|
+
|
11
|
+
@mixin fadeIn($duration: 1s, $delay: 0s, $fill-mode: forwards) {
|
12
|
+
@include animation(fadeIn $duration $delay $fill-mode);
|
13
|
+
}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
@include keyframes(newspaper) {
|
2
|
+
0% {
|
3
|
+
opacity: 0;
|
4
|
+
@include transform(rotate(720deg) scale(0.33) translateZ(0));
|
5
|
+
}
|
6
|
+
100% {
|
7
|
+
opacity: 1;
|
8
|
+
@include transform(rotate(0deg) scale(1));
|
9
|
+
}
|
10
|
+
}
|
11
|
+
|
12
|
+
@mixin newspaper($duration: 1s, $delay: 0s, $fill-mode: both, $count: 1, $timing: ease-in-out) {
|
13
|
+
@include animation(newspaper $count $duration $delay $fill-mode $timing);
|
14
|
+
}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
@include keyframes(popIn) {
|
2
|
+
0% {
|
3
|
+
@include transform(scale(0.25) translateZ(0));
|
4
|
+
opacity: 0;
|
5
|
+
}
|
6
|
+
100% {
|
7
|
+
opacity: 1;
|
8
|
+
@include transform(scale(1));
|
9
|
+
}
|
10
|
+
}
|
11
|
+
|
12
|
+
@mixin popIn($duration: 0.5s, $delay: 0s, $fill-mode: forwards) {
|
13
|
+
@include animation(popIn $duration $delay $fill-mode);
|
14
|
+
}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
@include keyframes(riseIn) {
|
2
|
+
0% {
|
3
|
+
opacity: 0;
|
4
|
+
@include transform(translateY($drop-rise-distance) translateZ(0));
|
5
|
+
}
|
6
|
+
50% {
|
7
|
+
opacity: 1
|
8
|
+
}
|
9
|
+
}
|
10
|
+
|
11
|
+
@mixin riseIn($duration: 0.5s, $delay: 0s, $fill-mode: forwards) {
|
12
|
+
@include animation(riseIn $duration $delay $fill-mode);
|
13
|
+
}
|
@@ -0,0 +1,35 @@
|
|
1
|
+
@include keyframes(slideInLeft) {
|
2
|
+
0% {
|
3
|
+
opacity: 0;
|
4
|
+
@include transform(translateX($translateX-distance * -10) translateZ(0));
|
5
|
+
}
|
6
|
+
65% {
|
7
|
+
opacity: 1;
|
8
|
+
@include transform(translateX($translateX-distance));
|
9
|
+
}
|
10
|
+
100% {
|
11
|
+
@include transform(translateX(0));
|
12
|
+
}
|
13
|
+
}
|
14
|
+
|
15
|
+
@mixin slideInLeft($duration: 1s, $delay: 0s, $fill-mode: forwards) {
|
16
|
+
@include animation(slideInLeft $duration $delay $fill-mode);
|
17
|
+
}
|
18
|
+
|
19
|
+
@include keyframes(slideInRight) {
|
20
|
+
0% {
|
21
|
+
opacity: 0;
|
22
|
+
@include transform(translateX($translateX-distance * 10) translateZ(0));
|
23
|
+
}
|
24
|
+
65% {
|
25
|
+
opacity: 1;
|
26
|
+
@include transform(translateX($translateX-distance * -1));
|
27
|
+
}
|
28
|
+
100% {
|
29
|
+
@include transform(translateX(0));
|
30
|
+
}
|
31
|
+
}
|
32
|
+
|
33
|
+
@mixin slideInRight($duration: 1s, $delay: 0s, $fill-mode: forwards) {
|
34
|
+
@include animation(slideInRight $duration $delay $fill-mode);
|
35
|
+
}
|
@@ -0,0 +1,33 @@
|
|
1
|
+
@include keyframes(stretch) {
|
2
|
+
0% {
|
3
|
+
@include transform(scaleY(0) translateZ(0));
|
4
|
+
}
|
5
|
+
40% {
|
6
|
+
@include transform(scaleY($stretch-compress-exageration));
|
7
|
+
}
|
8
|
+
60% {
|
9
|
+
@include transform(scaleY($stretch-compress-exageration - ($stretch-compress-exageration * .075)));
|
10
|
+
}
|
11
|
+
80% {
|
12
|
+
@include transform(scaleY($stretch-compress-exageration));
|
13
|
+
}
|
14
|
+
100% {
|
15
|
+
@include transform(scaleY($stretch-compress-exageration - ($stretch-compress-exageration * .075)));
|
16
|
+
}
|
17
|
+
80% {
|
18
|
+
@include transform(scaleY($stretch-compress-exageration - ($stretch-compress-exageration * .025)));
|
19
|
+
}
|
20
|
+
100% {
|
21
|
+
@include transform(scaleY(1));
|
22
|
+
}
|
23
|
+
}
|
24
|
+
|
25
|
+
@mixin stretchUp($duration: 1.75s, $delay: 0s, $count: 1, $fill-mode: both, $timing: ease-out) {
|
26
|
+
@include animation(stretch $count $duration $delay $fill-mode $timing);
|
27
|
+
@include prefix(transform-origin, 0 100%, webkit moz spec);
|
28
|
+
}
|
29
|
+
|
30
|
+
@mixin stretchDown($duration: 1.75s, $delay: 0s, $count: 1, $fill-mode: both, $timing: ease-out) {
|
31
|
+
@include animation(stretch $count $duration $delay $fill-mode $timing);
|
32
|
+
@include prefix(transform-origin, 0 0, webkit moz spec);
|
33
|
+
}
|
@@ -0,0 +1,31 @@
|
|
1
|
+
@include keyframes(turnDownIn) {
|
2
|
+
0% {
|
3
|
+
opacity: 0;
|
4
|
+
@include transform(perspective(500px) rotateX($turn-angle * -1) translateZ(150px));
|
5
|
+
}
|
6
|
+
100% {
|
7
|
+
opacity: 1;
|
8
|
+
@include transform(perspective(800px) rotateX(0deg) translateZ(0));
|
9
|
+
@include prefix(backface-visibility, hidden, webkit moz spec);
|
10
|
+
}
|
11
|
+
}
|
12
|
+
|
13
|
+
@mixin turnDownIn($duration: 1s, $delay: 0s, $fill-mode: forwards) {
|
14
|
+
@include animation(turnDownIn $duration $delay $fill-mode);
|
15
|
+
}
|
16
|
+
|
17
|
+
@include keyframes(turnUpIn) {
|
18
|
+
0% {
|
19
|
+
opacity: 0;
|
20
|
+
@include transform(perspective(500px) rotateX($turn-angle) translateZ(150px));
|
21
|
+
}
|
22
|
+
100% {
|
23
|
+
opacity: 1;
|
24
|
+
@include transform(perspective(800px) rotateX(0deg) translateZ(0));
|
25
|
+
@include prefix(backface-visibility, hidden, webkit moz spec);
|
26
|
+
}
|
27
|
+
}
|
28
|
+
|
29
|
+
@mixin turnUpIn($duration: 1s, $delay: 0s, $fill-mode: forwards) {
|
30
|
+
@include animation(turnUpIn $duration $delay $fill-mode);
|
31
|
+
}
|
@@ -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
|
+
}
|