Skip to content

Commit be8582a

Browse files
warengonzagadaneden
authored andcommitted
Add new animation speed & delay classes
3.7.0 New Feature: Animation speed & delay classes, dependency updates
1 parent 1514f93 commit be8582a

File tree

9 files changed

+4195
-3952
lines changed

9 files changed

+4195
-3952
lines changed

.travis.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
language: node_js
22
node_js:
3-
- "9"
4-
- "8"
5-
- "6"
3+
- "10"
64
before_script:
75
- npm install -g gulp
86
script: gulp

README.md

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,13 +200,41 @@ You can change the duration of your animations, add a delay or change the number
200200

201201
_Note: be sure to replace "vendor" in the CSS with the applicable vendor prefixes (webkit, moz, etc)_
202202

203+
## Define _Delay_ and _Speed_ using Class
204+
205+
#### Delay Class
206+
203207
You can also add delays directly on the element's class attribute, just like this:
204208

205209
```html
206210
<div class="animated bounce delay-2s">Example</div>
207211
```
208212

209-
_Note: the default delays are from 1 seconds to 5 seconds only. If you want to add customized delays, you can add it directly to your css_
213+
| Class Name | Delay Time |
214+
| ---------- | ---------- |
215+
| `delay-2s` | `2s` |
216+
| `delay-3s` | `3s` |
217+
| `delay-4s` | `4s` |
218+
| `delay-5s` | `5s` |
219+
220+
> _**Note**: The default delays are from 1 second to 5 seconds only. If you want to add customized delays, you can add it directly to your css_
221+
222+
#### Slow, Slower, Fast, and Faster Class
223+
224+
You can control the speed of the animation by adding these classes, as a sample below:
225+
226+
```html
227+
<div class="animated bounce faster">Example</div>
228+
```
229+
230+
| Class Name | Speed Time |
231+
| ---------- | ---------- |
232+
| `slow` | `2s` |
233+
| `slower` | `3s` |
234+
| `fast` | `800ms` |
235+
| `faster` | `500ms` |
236+
237+
> _**Note**: The default speed is `1s` which is you don't need to put any class. If you want to add a custom duration, you can add it directly to your css instead_
210238
211239
## Custom Builds
212240

animate.css

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
/*!
44
* animate.css -http://daneden.me/animate
5-
* Version - 3.6.2
5+
* Version - 3.7.0
66
* Licensed under the MIT license - http://opensource.org/licenses/MIT
77
*
88
* Copyright (c) 2018 Daniel Eden
@@ -45,6 +45,26 @@
4545
animation-delay: 5s;
4646
}
4747

48+
.animated.fast {
49+
-webkit-animation-duration: 800ms;
50+
animation-duration: 800ms;
51+
}
52+
53+
.animated.faster {
54+
-webkit-animation-duration: 500ms;
55+
animation-duration: 500ms;
56+
}
57+
58+
.animated.slow {
59+
-webkit-animation-duration: 2s;
60+
animation-duration: 2s;
61+
}
62+
63+
.animated.slower {
64+
-webkit-animation-duration: 3s;
65+
animation-duration: 3s;
66+
}
67+
4868
@-webkit-keyframes bounce {
4969
from,
5070
20%,

animate.min.css

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gulpfile.js

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ var opts = {
2525

2626
autoprefixer: {
2727
browsers: ['> 1%', 'last 2 versions', 'Firefox ESR'],
28-
cascade: false
28+
cascade: false,
2929
},
3030

3131
minRename: {
32-
suffix: '.min'
32+
suffix: '.min',
3333
},
3434

3535
banner: [
@@ -41,17 +41,13 @@ var opts = {
4141
' *',
4242
' * Copyright (c) <%= new Date().getFullYear() %> <%= author.name %>',
4343
' */\n\n',
44-
].join('\n')
44+
].join('\n'),
4545
};
4646

4747
// ----------------------------
4848
// Gulp task definitions
4949
// ----------------------------
5050

51-
gulp.task('default', function() {
52-
runSequence('createCSS', 'addHeader');
53-
});
54-
5551
gulp.task('createCSS', function() {
5652
return gulp
5753
.src(activatedAnimations)
@@ -70,6 +66,8 @@ gulp.task('addHeader', function() {
7066
.pipe(gulp.dest(opts.destPath));
7167
});
7268

69+
gulp.task('default', gulp.series('createCSS', 'addHeader'));
70+
7371
// ----------------------------
7472
// Helpers/functions
7573
// ----------------------------

0 commit comments

Comments
 (0)