push origin masterMerge branch 'lipis-prettier'

This commit is contained in:
Elton Mesquita 2018-01-25 13:45:43 -03:00
commit 312162e264
34 changed files with 367 additions and 236 deletions

View file

@ -2,10 +2,11 @@
root = true
[*]
indent_style = space
indent_size = 2
tab_width = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
end_of_line = lf
indent_size = 2
indent_style = space
insert_final_newline = true
max_line_length = 100
tab_width = 2
trim_trailing_whitespace = true

1
.prettierignore Normal file
View file

@ -0,0 +1 @@
animate.min.css

154
README.md
View file

@ -1,5 +1,6 @@
# Animate.css [![GitHub release](https://img.shields.io/github/release/daneden/animate.css.svg)](https://github.com/daneden/animate.css/releases) [![CDNJS](https://img.shields.io/cdnjs/v/animate.css.svg)](https://cdnjs.com/libraries/animate.css) [![Build Status](https://travis-ci.org/WarenGonzaga/animate.css.svg?branch=master)](https://travis-ci.org/WarenGonzaga/animate.css) [![devDependencies Status](https://david-dm.org/WarenGonzaga/animate.css/dev-status.svg)](https://david-dm.org/WarenGonzaga/animate.css?type=dev) [![chat](https://img.shields.io/badge/chat-gitter-green.svg)](https://gitter.im/animate-css/Lobby)
*Just-add-water CSS animation*
_Just-add-water CSS animation_
`animate.css` is a bunch of cool, fun, and cross-browser animations for you to use in your projects. Great for emphasis, home pages, sliders, and general just-add-water-awesomeness.
@ -10,6 +11,7 @@ To install via Bower, simply do the following:
```bash
$ bower install animate.css --save
```
or you can install via npm:
```bash
@ -17,65 +19,71 @@ $ npm install animate.css --save
```
## Basic Usage
1. Include the stylesheet on your document's `<head>`
```html
<head>
<link rel="stylesheet" href="animate.min.css">
</head>
```
Instead of installing you may use the remote version (hosted by [CDNJS](https://cdnjs.com/libraries/animate.css)):
```html
<head>
<link rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/animate.css@3.5.2/animate.min.css">
<!-- or -->
<link rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.5.2/animate.min.css">
</head>
```
You may [generate a SRI hash](https://www.srihash.org/) of that particular version and then use it to ensure the file's integrity; also you can make anonymous requests to CDN by setting the corresponding [`crossorigin`](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) attribute:
```html
<head>
<link rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/animate.css@3.5.2/animate.min.css"
integrity="sha384-OHBBOqpYHNsIqQy8hL1U+8OXf9hH6QRxi0+EODezv82DfnZoV7qoHAZDwMwEJvSw"
crossorigin="anonymous">
<!-- or -->
<link rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.5.2/animate.min.css"
integrity="sha384-OHBBOqpYHNsIqQy8hL1U+8OXf9hH6QRxi0+EODezv82DfnZoV7qoHAZDwMwEJvSw"
crossorigin="anonymous">
</head>
```
2. Add the class `animated` to the element you want to animate.
You may also want to include the class `infinite` for an infinite loop.
```html
<head>
<link rel="stylesheet" href="animate.min.css">
</head>
```
Instead of installing you may use the remote version (hosted by [CDNJS](https://cdnjs.com/libraries/animate.css)):
```html
<head>
<link rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/animate.css@3.5.2/animate.min.css">
<!-- or -->
<link rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.5.2/animate.min.css">
</head>
```
You may [generate a SRI hash](https://www.srihash.org/) of that particular version and then use it to ensure the file's integrity; also you can make anonymous requests to CDN by setting the corresponding [`crossorigin`](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) attribute:
```html
<head>
<link rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/animate.css@3.5.2/animate.min.css"
integrity="sha384-OHBBOqpYHNsIqQy8hL1U+8OXf9hH6QRxi0+EODezv82DfnZoV7qoHAZDwMwEJvSw"
crossorigin="anonymous">
<!-- or -->
<link rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.5.2/animate.min.css"
integrity="sha384-OHBBOqpYHNsIqQy8hL1U+8OXf9hH6QRxi0+EODezv82DfnZoV7qoHAZDwMwEJvSw"
crossorigin="anonymous">
</head>
```
2. Add the class `animated` to the element you want to animate. You may also want to include the class `infinite` for an infinite loop.
3. Finally you need to add one of the following classes:
| Class Name | | | |
|--------------------|--------------------|--------------------|--------------------|
| `bounce` |`flash` |`pulse` |`rubberBand` |
| `shake` |`headShake` |`swing` |`tada` |
| `wobble` |`jello` |`bounceIn` |`bounceInDown` |
| `bounceInLeft` |`bounceInRight` |`bounceInUp` |`bounceOut` |
| `bounceOutDown` |`bounceOutLeft` |`bounceOutRight` |`bounceOutUp` |
| `fadeIn` |`fadeInDown` |`fadeInDownBig` |`fadeInLeft` |
| `fadeInLeftBig` |`fadeInRight` |`fadeInRightBig` |`fadeInUp` |
| `fadeInUpBig` |`fadeOut` |`fadeOutDown` |`fadeOutDownBig` |
| `fadeOutLeft` |`fadeOutLeftBig` |`fadeOutRight` |`fadeOutRightBig` |
| `fadeOutUp` |`fadeOutUpBig` |`flipInX` |`flipInY` |
| `flipOutX` |`flipOutY` |`lightSpeedIn` |`lightSpeedOut` |
| `rotateIn` |`rotateInDownLeft` |`rotateInDownRight` |`rotateInUpLeft` |
| `rotateInUpRight` |`rotateOut` |`rotateOutDownLeft` |`rotateOutDownRight` |
| `rotateOutUpLeft` |`rotateOutUpRight` |`hinge` |`jackInTheBox` |
| `rollIn` |`rollOut` |`zoomIn` |`zoomInDown` |
| `zoomInLeft` |`zoomInRight` |`zoomInUp` |`zoomOut` |
| `zoomOutDown` |`zoomOutLeft` |`zoomOutRight` |`zoomOutUp` |
| `slideInDown` |`slideInLeft` |`slideInRight` |`slideInUp` |
| `slideOutDown` |`slideOutLeft` |`slideOutRight` |`slideOutUp` |
| Class Name | | | |
| ----------------- | ------------------ | ------------------- | -------------------- |
| `bounce` | `flash` | `pulse` | `rubberBand` |
| `shake` | `headShake` | `swing` | `tada` |
| `wobble` | `jello` | `bounceIn` | `bounceInDown` |
| `bounceInLeft` | `bounceInRight` | `bounceInUp` | `bounceOut` |
| `bounceOutDown` | `bounceOutLeft` | `bounceOutRight` | `bounceOutUp` |
| `fadeIn` | `fadeInDown` | `fadeInDownBig` | `fadeInLeft` |
| `fadeInLeftBig` | `fadeInRight` | `fadeInRightBig` | `fadeInUp` |
| `fadeInUpBig` | `fadeOut` | `fadeOutDown` | `fadeOutDownBig` |
| `fadeOutLeft` | `fadeOutLeftBig` | `fadeOutRight` | `fadeOutRightBig` |
| `fadeOutUp` | `fadeOutUpBig` | `flipInX` | `flipInY` |
| `flipOutX` | `flipOutY` | `lightSpeedIn` | `lightSpeedOut` |
| `rotateIn` | `rotateInDownLeft` | `rotateInDownRight` | `rotateInUpLeft` |
| `rotateInUpRight` | `rotateOut` | `rotateOutDownLeft` | `rotateOutDownRight` |
| `rotateOutUpLeft` | `rotateOutUpRight` | `hinge` | `jackInTheBox` |
| `rollIn` | `rollOut` | `zoomIn` | `zoomInDown` |
| `zoomInLeft` | `zoomInRight` | `zoomInUp` | `zoomOut` |
| `zoomOutDown` | `zoomOutLeft` | `zoomOutRight` | `zoomOutUp` |
| `slideInDown` | `slideInLeft` | `slideInRight` | `slideInUp` |
| `slideOutDown` | `slideOutLeft` | `slideOutRight` | `slideOutUp` |
Full example:
```html
<h1 class="animated infinite bounce">Example</h1>
```
@ -83,6 +91,7 @@ Full example:
[Check out all the animations here!](https://daneden.github.io/animate.css/)
## Usage
To use animate.css in your website, simply drop the stylesheet into your document's `<head>`, and add the class `animated` to an element, along with any of the animation names. That's it! You've got a CSS animated element. Super!
```html
@ -90,7 +99,9 @@ To use animate.css in your website, simply drop the stylesheet into your documen
<link rel="stylesheet" href="animate.min.css">
</head>
```
or use the version hosted by [CDNJS](https://cdnjs.com/libraries/animate.css)
```html
<head>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.5.2/animate.min.css">
@ -112,27 +123,31 @@ http://api.jquery.com/one/
-->
```javascript
$('#yourElement').one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', doSomething);
$('#yourElement').one(
'webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend',
doSomething,
);
```
[View a video tutorial](https://www.youtube.com/watch?v=CBQGl6zokMs) on how to use Animate.css with jQuery here.
**Note:** `jQuery.one()` is used when you want to execute the event handler at most *once*. More information [here](http://api.jquery.com/one/).
**Note:** `jQuery.one()` is used when you want to execute the event handler at most _once_. More information [here](http://api.jquery.com/one/).
You can also extend jQuery to add a function that does it all for you:
```javascript
$.fn.extend({
animateCss: function (animationName, callback) {
var animationEnd = 'webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend';
this.addClass('animated ' + animationName).one(animationEnd, function() {
$(this).removeClass('animated ' + animationName);
if (callback) {
callback();
}
});
return this;
}
animateCss: function(animationName, callback) {
var animationEnd =
'webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend';
this.addClass('animated ' + animationName).one(animationEnd, function() {
$(this).removeClass('animated ' + animationName);
if (callback) {
callback();
}
});
return this;
},
});
```
@ -140,8 +155,8 @@ And use it like this:
```javascript
$('#yourElement').animateCss('bounce');
or
$('#yourElement').animateCss('bounce', function () {
or;
$('#yourElement').animateCss('bounce', function() {
// Do somthing after animation
});
```
@ -156,9 +171,10 @@ You can change the duration of your animations, add a delay or change the number
}
```
*Note: be sure to replace "vendor" in the CSS with the applicable vendor prefixes (webkit, moz, etc)*
_Note: be sure to replace "vendor" in the CSS with the applicable vendor prefixes (webkit, moz, etc)_
## Custom Builds
Animate.css is powered by [gulp.js](http://gulpjs.com/), and you can create custom builds pretty easily. First of all, youll need Gulp and all other dependencies:
```sh
@ -183,7 +199,9 @@ Next, run `gulp` to compile your custom builds. For example, if you want only so
```
## License
Animate.css is licensed under the MIT license. (http://opensource.org/licenses/MIT)
## Contributing
Pull requests are the way to go here. I apologise in advance for the slow action on pull requests and issues. I only have two rules for submitting a pull request: match the naming convention (camelCase, categorised [fades, bounces, etc]) and let us see a demo of submitted animations in a [pen](http://codepen.io). That last one is important.

View file

@ -1,5 +1,4 @@
{
"attention_seekers": {
"bounce": true,
"flash": true,

192
animate.css vendored
View file

@ -25,27 +25,32 @@
.animated.flipOutY,
.animated.bounceIn,
.animated.bounceOut {
animation-duration: .75s;
animation-duration: 0.75s;
}
@keyframes bounce {
from, 20%, 53%, 80%, to {
animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
transform: translate3d(0,0,0);
from,
20%,
53%,
80%,
to {
animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
transform: translate3d(0, 0, 0);
}
40%, 43% {
animation-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060);
40%,
43% {
animation-timing-function: cubic-bezier(0.755, 0.05, 0.855, 0.06);
transform: translate3d(0, -30px, 0);
}
70% {
animation-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060);
animation-timing-function: cubic-bezier(0.755, 0.05, 0.855, 0.06);
transform: translate3d(0, -15px, 0);
}
90% {
transform: translate3d(0,-4px,0);
transform: translate3d(0, -4px, 0);
}
}
@ -55,11 +60,14 @@
}
@keyframes flash {
from, 50%, to {
from,
50%,
to {
opacity: 1;
}
25%, 75% {
25%,
75% {
opacity: 0;
}
}
@ -106,11 +114,11 @@
}
65% {
transform: scale3d(.95, 1.05, 1);
transform: scale3d(0.95, 1.05, 1);
}
75% {
transform: scale3d(1.05, .95, 1);
transform: scale3d(1.05, 0.95, 1);
}
to {
@ -123,15 +131,23 @@
}
@keyframes shake {
from, to {
from,
to {
transform: translate3d(0, 0, 0);
}
10%, 30%, 50%, 70%, 90% {
10%,
30%,
50%,
70%,
90% {
transform: translate3d(-10px, 0, 0);
}
20%, 40%, 60%, 80% {
20%,
40%,
60%,
80% {
transform: translate3d(10px, 0, 0);
}
}
@ -203,15 +219,21 @@
transform: scale3d(1, 1, 1);
}
10%, 20% {
transform: scale3d(.9, .9, .9) rotate3d(0, 0, 1, -3deg);
10%,
20% {
transform: scale3d(0.9, 0.9, 0.9) rotate3d(0, 0, 1, -3deg);
}
30%, 50%, 70%, 90% {
30%,
50%,
70%,
90% {
transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, 3deg);
}
40%, 60%, 80% {
40%,
60%,
80% {
transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, -3deg);
}
@ -261,7 +283,9 @@
}
@keyframes jello {
from, 11.1%, to {
from,
11.1%,
to {
transform: none;
}
@ -300,13 +324,18 @@
}
@keyframes bounceIn {
from, 20%, 40%, 60%, 80%, to {
animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
from,
20%,
40%,
60%,
80%,
to {
animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
}
0% {
opacity: 0;
transform: scale3d(.3, .3, .3);
transform: scale3d(0.3, 0.3, 0.3);
}
20% {
@ -314,7 +343,7 @@
}
40% {
transform: scale3d(.9, .9, .9);
transform: scale3d(0.9, 0.9, 0.9);
}
60% {
@ -323,7 +352,7 @@
}
80% {
transform: scale3d(.97, .97, .97);
transform: scale3d(0.97, 0.97, 0.97);
}
to {
@ -337,8 +366,12 @@
}
@keyframes bounceInDown {
from, 60%, 75%, 90%, to {
animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
from,
60%,
75%,
90%,
to {
animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
}
0% {
@ -369,8 +402,12 @@
}
@keyframes bounceInLeft {
from, 60%, 75%, 90%, to {
animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
from,
60%,
75%,
90%,
to {
animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
}
0% {
@ -401,8 +438,12 @@
}
@keyframes bounceInRight {
from, 60%, 75%, 90%, to {
animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
from,
60%,
75%,
90%,
to {
animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
}
from {
@ -433,8 +474,12 @@
}
@keyframes bounceInUp {
from, 60%, 75%, 90%, to {
animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
from,
60%,
75%,
90%,
to {
animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
}
from {
@ -466,17 +511,18 @@
@keyframes bounceOut {
20% {
transform: scale3d(.9, .9, .9);
transform: scale3d(0.9, 0.9, 0.9);
}
50%, 55% {
50%,
55% {
opacity: 1;
transform: scale3d(1.1, 1.1, 1.1);
}
to {
opacity: 0;
transform: scale3d(.3, .3, .3);
transform: scale3d(0.3, 0.3, 0.3);
}
}
@ -489,7 +535,8 @@
transform: translate3d(0, 10px, 0);
}
40%, 45% {
40%,
45% {
opacity: 1;
transform: translate3d(0, -20px, 0);
}
@ -541,7 +588,8 @@
transform: translate3d(0, -10px, 0);
}
40%, 45% {
40%,
45% {
opacity: 1;
transform: translate3d(0, 20px, 0);
}
@ -849,7 +897,7 @@
}
80% {
transform: perspective(400px) scale3d(.95, .95, .95);
transform: perspective(400px) scale3d(0.95, 0.95, 0.95);
animation-timing-function: ease-in;
}
@ -1197,13 +1245,15 @@
animation-timing-function: ease-in-out;
}
20%, 60% {
20%,
60% {
transform: rotate3d(0, 0, 1, 80deg);
transform-origin: top left;
animation-timing-function: ease-in-out;
}
40%, 80% {
40%,
80% {
transform: rotate3d(0, 0, 1, 60deg);
transform-origin: top left;
animation-timing-function: ease-in-out;
@ -1283,7 +1333,7 @@
@keyframes zoomIn {
from {
opacity: 0;
transform: scale3d(.3, .3, .3);
transform: scale3d(0.3, 0.3, 0.3);
}
50% {
@ -1298,14 +1348,14 @@
@keyframes zoomInDown {
from {
opacity: 0;
transform: scale3d(.1, .1, .1) translate3d(0, -1000px, 0);
animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190);
transform: scale3d(0.1, 0.1, 0.1) translate3d(0, -1000px, 0);
animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19);
}
60% {
opacity: 1;
transform: scale3d(.475, .475, .475) translate3d(0, 60px, 0);
animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1);
transform: scale3d(0.475, 0.475, 0.475) translate3d(0, 60px, 0);
animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1);
}
}
@ -1316,14 +1366,14 @@
@keyframes zoomInLeft {
from {
opacity: 0;
transform: scale3d(.1, .1, .1) translate3d(-1000px, 0, 0);
animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190);
transform: scale3d(0.1, 0.1, 0.1) translate3d(-1000px, 0, 0);
animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19);
}
60% {
opacity: 1;
transform: scale3d(.475, .475, .475) translate3d(10px, 0, 0);
animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1);
transform: scale3d(0.475, 0.475, 0.475) translate3d(10px, 0, 0);
animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1);
}
}
@ -1334,14 +1384,14 @@
@keyframes zoomInRight {
from {
opacity: 0;
transform: scale3d(.1, .1, .1) translate3d(1000px, 0, 0);
animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190);
transform: scale3d(0.1, 0.1, 0.1) translate3d(1000px, 0, 0);
animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19);
}
60% {
opacity: 1;
transform: scale3d(.475, .475, .475) translate3d(-10px, 0, 0);
animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1);
transform: scale3d(0.475, 0.475, 0.475) translate3d(-10px, 0, 0);
animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1);
}
}
@ -1352,14 +1402,14 @@
@keyframes zoomInUp {
from {
opacity: 0;
transform: scale3d(.1, .1, .1) translate3d(0, 1000px, 0);
animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190);
transform: scale3d(0.1, 0.1, 0.1) translate3d(0, 1000px, 0);
animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19);
}
60% {
opacity: 1;
transform: scale3d(.475, .475, .475) translate3d(0, -60px, 0);
animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1);
transform: scale3d(0.475, 0.475, 0.475) translate3d(0, -60px, 0);
animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1);
}
}
@ -1374,7 +1424,7 @@
50% {
opacity: 0;
transform: scale3d(.3, .3, .3);
transform: scale3d(0.3, 0.3, 0.3);
}
to {
@ -1389,15 +1439,15 @@
@keyframes zoomOutDown {
40% {
opacity: 1;
transform: scale3d(.475, .475, .475) translate3d(0, -60px, 0);
animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190);
transform: scale3d(0.475, 0.475, 0.475) translate3d(0, -60px, 0);
animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19);
}
to {
opacity: 0;
transform: scale3d(.1, .1, .1) translate3d(0, 2000px, 0);
transform: scale3d(0.1, 0.1, 0.1) translate3d(0, 2000px, 0);
transform-origin: center bottom;
animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1);
animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1);
}
}
@ -1408,12 +1458,12 @@
@keyframes zoomOutLeft {
40% {
opacity: 1;
transform: scale3d(.475, .475, .475) translate3d(42px, 0, 0);
transform: scale3d(0.475, 0.475, 0.475) translate3d(42px, 0, 0);
}
to {
opacity: 0;
transform: scale(.1) translate3d(-2000px, 0, 0);
transform: scale(0.1) translate3d(-2000px, 0, 0);
transform-origin: left center;
}
}
@ -1425,12 +1475,12 @@
@keyframes zoomOutRight {
40% {
opacity: 1;
transform: scale3d(.475, .475, .475) translate3d(-42px, 0, 0);
transform: scale3d(0.475, 0.475, 0.475) translate3d(-42px, 0, 0);
}
to {
opacity: 0;
transform: scale(.1) translate3d(2000px, 0, 0);
transform: scale(0.1) translate3d(2000px, 0, 0);
transform-origin: right center;
}
}
@ -1442,15 +1492,15 @@
@keyframes zoomOutUp {
40% {
opacity: 1;
transform: scale3d(.475, .475, .475) translate3d(0, 60px, 0);
animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190);
transform: scale3d(0.475, 0.475, 0.475) translate3d(0, 60px, 0);
animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19);
}
to {
opacity: 0;
transform: scale3d(.1, .1, .1) translate3d(0, -2000px, 0);
transform: scale3d(0.1, 0.1, 0.1) translate3d(0, -2000px, 0);
transform-origin: center bottom;
animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1);
animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1);
}
}

View file

@ -1,11 +1,5 @@
{
"name": "animate.css",
"main": "./animate.css",
"ignore": [
".*",
"*.yml",
"Gemfile",
"Gemfile.lock",
"*.md"
]
"ignore": [".*", "*.yml", "Gemfile", "Gemfile.lock", "*.md"]
}

View file

@ -25,11 +25,11 @@ var opts = {
autoprefixer: {
browsers: ['> 1%', 'last 2 versions', 'Firefox ESR'],
cascade: false
cascade: false,
},
minRename: {
suffix: '.min'
suffix: '.min',
},
banner: [
@ -40,8 +40,8 @@ var opts = {
' * Licensed under the MIT license - http://opensource.org/licenses/MIT',
' *',
' * Copyright (c) <%= new Date().getFullYear() %> <%= author.name %>',
' */\n\n'
].join('\n')
' */\n\n',
].join('\n'),
};
// ----------------------------
@ -53,21 +53,19 @@ gulp.task('default', function() {
});
gulp.task('createCSS', function() {
return gulp.src(activatedAnimations)
return gulp
.src(activatedAnimations)
.pipe(concat(opts.concatName))
.pipe(postcss([
autoprefixer(opts.autoprefixer)
]))
.pipe(postcss([autoprefixer(opts.autoprefixer)]))
.pipe(gulp.dest(opts.destPath))
.pipe(postcss([
cssnano({reduceIdents: {keyframes: false}})
]))
.pipe(postcss([cssnano({reduceIdents: {keyframes: false}})]))
.pipe(rename(opts.minRename))
.pipe(gulp.dest(opts.destPath));
});
gulp.task('addHeader', function() {
return gulp.src('*.css')
return gulp
.src('*.css')
.pipe(header(opts.banner, pkg))
.pipe(gulp.dest(opts.destPath));
});
@ -79,8 +77,10 @@ gulp.task('addHeader', function() {
// Read the config file and return an array of the animations to be activated
function activateAnimations() {
var categories = JSON.parse(fs.readFileSync('animate-config.json')),
category, files, file,
target = [ 'source/_base.css' ],
category,
files,
file,
target = ['source/_base.css'],
count = 0;
for (category in categories) {
@ -88,7 +88,8 @@ function activateAnimations() {
files = categories[category];
for (file in files) {
if (files[file]) { // marked as true
if (files[file]) {
// marked as true
target.push('source/' + category + '/' + file + '.css');
count += 1;
}

View file

@ -22,14 +22,31 @@
"devDependencies": {
"autoprefixer": "^7.1.6",
"cssnano": "^3.5.1",
"eslint": "^4.11.0",
"gulp": "^3.9.1",
"gulp-concat": "^2.6.0",
"gulp-header": "^1.7.1",
"gulp-postcss": "^7.0.0",
"gulp-rename": "^1.2.2",
"gulp-util": "^3.0.7",
"husky": "^0.14.3",
"lint-staged": "^6.0.0",
"prettier": "^1.9.1",
"run-sequence": "^2.2.0"
},
"lint-staged": {
"*.{js,json,md,css}": ["prettier --write", "git add"]
},
"prettier": {
"bracketSpacing": false,
"proseWrap": "never",
"singleQuote": true,
"trailingComma": "all"
},
"scripts": {
"prettier": "prettier --write \"**/*.{js,json,md,css}\"",
"precommit": "lint-staged"
},
"spm": {
"main": "./animate.css"
}

View file

@ -1,16 +1,21 @@
@keyframes bounce {
from, 20%, 53%, 80%, to {
animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
transform: translate3d(0,0,0);
from,
20%,
53%,
80%,
to {
animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
transform: translate3d(0, 0, 0);
}
40%, 43% {
animation-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060);
40%,
43% {
animation-timing-function: cubic-bezier(0.755, 0.05, 0.855, 0.06);
transform: translate3d(0, -30px, 0);
}
70% {
animation-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060);
animation-timing-function: cubic-bezier(0.755, 0.05, 0.855, 0.06);
transform: translate3d(0, -15px, 0);
}

View file

@ -1,9 +1,12 @@
@keyframes flash {
from, 50%, to {
from,
50%,
to {
opacity: 1;
}
25%, 75% {
25%,
75% {
opacity: 0;
}
}

View file

@ -1,5 +1,7 @@
@keyframes jello {
from, 11.1%, to {
from,
11.1%,
to {
transform: none;
}

View file

@ -16,11 +16,11 @@
}
65% {
transform: scale3d(.95, 1.05, 1);
transform: scale3d(0.95, 1.05, 1);
}
75% {
transform: scale3d(1.05, .95, 1);
transform: scale3d(1.05, 0.95, 1);
}
to {

View file

@ -1,13 +1,21 @@
@keyframes shake {
from, to {
from,
to {
transform: translate3d(0, 0, 0);
}
10%, 30%, 50%, 70%, 90% {
10%,
30%,
50%,
70%,
90% {
transform: translate3d(-10px, 0, 0);
}
20%, 40%, 60%, 80% {
20%,
40%,
60%,
80% {
transform: translate3d(10px, 0, 0);
}
}

View file

@ -3,15 +3,21 @@
transform: scale3d(1, 1, 1);
}
10%, 20% {
transform: scale3d(.9, .9, .9) rotate3d(0, 0, 1, -3deg);
10%,
20% {
transform: scale3d(0.9, 0.9, 0.9) rotate3d(0, 0, 1, -3deg);
}
30%, 50%, 70%, 90% {
30%,
50%,
70%,
90% {
transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, 3deg);
}
40%, 60%, 80% {
40%,
60%,
80% {
transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, -3deg);
}

View file

@ -1,11 +1,16 @@
@keyframes bounceIn {
from, 20%, 40%, 60%, 80%, to {
animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
from,
20%,
40%,
60%,
80%,
to {
animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
}
0% {
opacity: 0;
transform: scale3d(.3, .3, .3);
transform: scale3d(0.3, 0.3, 0.3);
}
20% {
@ -13,7 +18,7 @@
}
40% {
transform: scale3d(.9, .9, .9);
transform: scale3d(0.9, 0.9, 0.9);
}
60% {
@ -22,7 +27,7 @@
}
80% {
transform: scale3d(.97, .97, .97);
transform: scale3d(0.97, 0.97, 0.97);
}
to {

View file

@ -1,6 +1,10 @@
@keyframes bounceInDown {
from, 60%, 75%, 90%, to {
animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
from,
60%,
75%,
90%,
to {
animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
}
0% {

View file

@ -1,6 +1,10 @@
@keyframes bounceInLeft {
from, 60%, 75%, 90%, to {
animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
from,
60%,
75%,
90%,
to {
animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
}
0% {

View file

@ -1,6 +1,10 @@
@keyframes bounceInRight {
from, 60%, 75%, 90%, to {
animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
from,
60%,
75%,
90%,
to {
animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
}
from {

View file

@ -1,6 +1,10 @@
@keyframes bounceInUp {
from, 60%, 75%, 90%, to {
animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
from,
60%,
75%,
90%,
to {
animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
}
from {

View file

@ -1,16 +1,17 @@
@keyframes bounceOut {
20% {
transform: scale3d(.9, .9, .9);
transform: scale3d(0.9, 0.9, 0.9);
}
50%, 55% {
50%,
55% {
opacity: 1;
transform: scale3d(1.1, 1.1, 1.1);
}
to {
opacity: 0;
transform: scale3d(.3, .3, .3);
transform: scale3d(0.3, 0.3, 0.3);
}
}

View file

@ -3,7 +3,8 @@
transform: translate3d(0, 10px, 0);
}
40%, 45% {
40%,
45% {
opacity: 1;
transform: translate3d(0, -20px, 0);
}

View file

@ -3,7 +3,8 @@
transform: translate3d(0, -10px, 0);
}
40%, 45% {
40%,
45% {
opacity: 1;
transform: translate3d(0, 20px, 0);
}

View file

@ -15,7 +15,7 @@
}
80% {
transform: perspective(400px) scale3d(.95, .95, .95);
transform: perspective(400px) scale3d(0.95, 0.95, 0.95);
animation-timing-function: ease-in;
}

View file

@ -4,13 +4,15 @@
animation-timing-function: ease-in-out;
}
20%, 60% {
20%,
60% {
transform: rotate3d(0, 0, 1, 80deg);
transform-origin: top left;
animation-timing-function: ease-in-out;
}
40%, 80% {
40%,
80% {
transform: rotate3d(0, 0, 1, 60deg);
transform-origin: top left;
animation-timing-function: ease-in-out;

View file

@ -1,7 +1,7 @@
@keyframes zoomIn {
from {
opacity: 0;
transform: scale3d(.3, .3, .3);
transform: scale3d(0.3, 0.3, 0.3);
}
50% {

View file

@ -1,14 +1,14 @@
@keyframes zoomInDown {
from {
opacity: 0;
transform: scale3d(.1, .1, .1) translate3d(0, -1000px, 0);
animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190);
transform: scale3d(0.1, 0.1, 0.1) translate3d(0, -1000px, 0);
animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19);
}
60% {
opacity: 1;
transform: scale3d(.475, .475, .475) translate3d(0, 60px, 0);
animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1);
transform: scale3d(0.475, 0.475, 0.475) translate3d(0, 60px, 0);
animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1);
}
}

View file

@ -1,14 +1,14 @@
@keyframes zoomInLeft {
from {
opacity: 0;
transform: scale3d(.1, .1, .1) translate3d(-1000px, 0, 0);
animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190);
transform: scale3d(0.1, 0.1, 0.1) translate3d(-1000px, 0, 0);
animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19);
}
60% {
opacity: 1;
transform: scale3d(.475, .475, .475) translate3d(10px, 0, 0);
animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1);
transform: scale3d(0.475, 0.475, 0.475) translate3d(10px, 0, 0);
animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1);
}
}

View file

@ -1,14 +1,14 @@
@keyframes zoomInRight {
from {
opacity: 0;
transform: scale3d(.1, .1, .1) translate3d(1000px, 0, 0);
animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190);
transform: scale3d(0.1, 0.1, 0.1) translate3d(1000px, 0, 0);
animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19);
}
60% {
opacity: 1;
transform: scale3d(.475, .475, .475) translate3d(-10px, 0, 0);
animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1);
transform: scale3d(0.475, 0.475, 0.475) translate3d(-10px, 0, 0);
animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1);
}
}

View file

@ -1,14 +1,14 @@
@keyframes zoomInUp {
from {
opacity: 0;
transform: scale3d(.1, .1, .1) translate3d(0, 1000px, 0);
animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190);
transform: scale3d(0.1, 0.1, 0.1) translate3d(0, 1000px, 0);
animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19);
}
60% {
opacity: 1;
transform: scale3d(.475, .475, .475) translate3d(0, -60px, 0);
animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1);
transform: scale3d(0.475, 0.475, 0.475) translate3d(0, -60px, 0);
animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1);
}
}

View file

@ -5,7 +5,7 @@
50% {
opacity: 0;
transform: scale3d(.3, .3, .3);
transform: scale3d(0.3, 0.3, 0.3);
}
to {

View file

@ -1,15 +1,15 @@
@keyframes zoomOutDown {
40% {
opacity: 1;
transform: scale3d(.475, .475, .475) translate3d(0, -60px, 0);
animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190);
transform: scale3d(0.475, 0.475, 0.475) translate3d(0, -60px, 0);
animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19);
}
to {
opacity: 0;
transform: scale3d(.1, .1, .1) translate3d(0, 2000px, 0);
transform: scale3d(0.1, 0.1, 0.1) translate3d(0, 2000px, 0);
transform-origin: center bottom;
animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1);
animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1);
}
}

View file

@ -1,12 +1,12 @@
@keyframes zoomOutLeft {
40% {
opacity: 1;
transform: scale3d(.475, .475, .475) translate3d(42px, 0, 0);
transform: scale3d(0.475, 0.475, 0.475) translate3d(42px, 0, 0);
}
to {
opacity: 0;
transform: scale(.1) translate3d(-2000px, 0, 0);
transform: scale(0.1) translate3d(-2000px, 0, 0);
transform-origin: left center;
}
}

View file

@ -1,12 +1,12 @@
@keyframes zoomOutRight {
40% {
opacity: 1;
transform: scale3d(.475, .475, .475) translate3d(-42px, 0, 0);
transform: scale3d(0.475, 0.475, 0.475) translate3d(-42px, 0, 0);
}
to {
opacity: 0;
transform: scale(.1) translate3d(2000px, 0, 0);
transform: scale(0.1) translate3d(2000px, 0, 0);
transform-origin: right center;
}
}

View file

@ -1,15 +1,15 @@
@keyframes zoomOutUp {
40% {
opacity: 1;
transform: scale3d(.475, .475, .475) translate3d(0, 60px, 0);
animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190);
transform: scale3d(0.475, 0.475, 0.475) translate3d(0, 60px, 0);
animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19);
}
to {
opacity: 0;
transform: scale3d(.1, .1, .1) translate3d(0, -2000px, 0);
transform: scale3d(0.1, 0.1, 0.1) translate3d(0, -2000px, 0);
transform-origin: center bottom;
animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1);
animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1);
}
}