forked from animate-css/animate.css
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Conflicts: bower.json
- Loading branch information
Showing
131 changed files
with
3,486 additions
and
6,545 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
{ | ||
|
||
"attention_seekers": { | ||
"bounce": true, | ||
"flash": true, | ||
"pulse": true, | ||
"shake": true, | ||
"swing": true, | ||
"tada": true, | ||
"wobble": true | ||
}, | ||
|
||
"bouncing_entrances": { | ||
"bounceIn": true, | ||
"bounceInDown": true, | ||
"bounceInLeft": true, | ||
"bounceInRight": true, | ||
"bounceInUp": true | ||
}, | ||
|
||
"bouncing_exits": { | ||
"bounceOut": true, | ||
"bounceOutDown": true, | ||
"bounceOutLeft": true, | ||
"bounceOutRight": true, | ||
"bounceOutUp": true | ||
}, | ||
|
||
"fading_entrances": { | ||
"fadeIn": true, | ||
"fadeInDown": true, | ||
"fadeInDownBig": true, | ||
"fadeInLeft": true, | ||
"fadeInLeftBig": true, | ||
"fadeInRight": true, | ||
"fadeInRightBig": true, | ||
"fadeInUp": true, | ||
"fadeInUpBig": true | ||
}, | ||
|
||
"fading_exits": { | ||
"fadeOut": true, | ||
"fadeOutDown": true, | ||
"fadeOutDownBig": true, | ||
"fadeOutLeft": true, | ||
"fadeOutLeftBig": true, | ||
"fadeOutRight": true, | ||
"fadeOutRightBig": true, | ||
"fadeOutUp": true, | ||
"fadeOutUpBig": true | ||
}, | ||
|
||
"flippers": { | ||
"flip": true, | ||
"flipInX": true, | ||
"flipInY": true, | ||
"flipOutX": true, | ||
"flipOutY": true | ||
}, | ||
|
||
"lightspeed": { | ||
"lightspeedIn": true, | ||
"lightspeedOut": true | ||
}, | ||
|
||
"rotating_entrances": { | ||
"rotateIn": true, | ||
"rotateInDownLeft": true, | ||
"rotateInDownRight": true, | ||
"rotateInUpLeft": true, | ||
"rotateInUpRight": true | ||
}, | ||
|
||
"rotating_exits": { | ||
"rotateOut": true, | ||
"rotateOutDownLeft": true, | ||
"rotateOutDownRight": true, | ||
"rotateOutUpLeft": true, | ||
"rotateOutUpRight": true | ||
}, | ||
|
||
"sliders": { | ||
"slideInDown": true, | ||
"slideInLeft": true, | ||
"slideInRight": true, | ||
"slideOutLeft": true, | ||
"slideOutRight": true, | ||
"slideOutUp": true | ||
}, | ||
|
||
"specials": { | ||
"hinge": true, | ||
"rollIn": true, | ||
"rollOut": true | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.sass-cache | ||
node_modules/ | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
module.exports = function(grunt) { | ||
pkg: grunt.file.readJSON('package.json'), | ||
grunt.initConfig({ | ||
|
||
// Concatenate CSS files | ||
concat: { | ||
dist: { | ||
src: [ | ||
// _base.css required for .animated helper class | ||
'source/_base.css', | ||
'source/**/*.css' | ||
], | ||
dest: 'animate.css' | ||
} | ||
}, | ||
|
||
// Auto-prefix CSS properties using Can I Use? | ||
autoprefixer: { | ||
options: { | ||
browsers: ['last 3 versions', 'bb 10', 'android 3'] | ||
}, | ||
no_dest: { | ||
// File to output | ||
src: 'animate.css' | ||
}, | ||
}, | ||
|
||
// Minify CSS | ||
csso: { | ||
dist: { | ||
files: { | ||
// Output compressed CSS to style.min.css | ||
'animate.min.css': ['animate.css'] | ||
} | ||
} | ||
}, | ||
|
||
// Watch files for changes | ||
watch: { | ||
css: { | ||
files: [ | ||
'source/**/*', | ||
'!node_modules', | ||
'.animate-config' | ||
], | ||
// Run Sass, autoprefixer, and CSSO | ||
tasks: ['concat-anim', 'autoprefixer', 'csso'], | ||
} | ||
} | ||
|
||
}); | ||
|
||
// Register our tasks | ||
grunt.loadNpmTasks('grunt-contrib-watch'); | ||
grunt.loadNpmTasks('grunt-contrib-concat'); | ||
grunt.loadNpmTasks('grunt-autoprefixer'); | ||
grunt.loadNpmTasks('grunt-csso'); | ||
grunt.registerTask('default', ['watch']); | ||
|
||
grunt.registerTask('concat-anim', 'Concatenates activated animations', function () { | ||
var config = grunt.file.readJSON('.animate-config'), | ||
target = [ 'source/_base.css' ], | ||
count = 0 | ||
|
||
for (var cat in config) { | ||
for (var file in config[cat]) { | ||
if (config[cat][file]) { | ||
target.push('source/' + cat + '/' + file + '.css') | ||
count++ | ||
} | ||
} | ||
} | ||
|
||
if (!count) { | ||
grunt.log.writeln('No animations activated.') | ||
} | ||
|
||
grunt.log.writeln(count + (count > 1 ? ' animations' : ' animation') + ' activated.') | ||
|
||
grunt.config('concat', { 'animate.css': target }) | ||
grunt.task.run('concat') | ||
}); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,13 +6,25 @@ | |
##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 | ||
<head> | ||
<link rel="stylesheet" href="animate.min.css"> | ||
</head> | ||
``` | ||
|
||
You can do a whole bunch of other stuff with animate.css when you combine it with jQuery or add your own CSS rules. Dynamically add animations using jQuery with ease: | ||
|
||
```javascript | ||
$('#yourElement').addClass('animated bounceOutLeft'); | ||
``` | ||
|
||
You can change the duration of your animations, add a delay or change the number of times that it plays! | ||
You can also detect when an animation ends: | ||
|
||
```javascript | ||
$('#yourElement').one('webkitAnimationEnd mozAnimationEnd oAnimationEnd animationEnd', doSomething()); | ||
``` | ||
|
||
You can change the duration of your animations, add a delay or change the number of times that it plays: | ||
|
||
```css | ||
#yourElement { | ||
|
@@ -22,97 +34,32 @@ 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, ms, o)* | ||
*Note: be sure to replace "vendor" in the CSS with the applicable vendor prefixes (webkit, moz, etc)* | ||
|
||
## Custom Builds | ||
Animate.css is powered by [Grunt](http://gruntjs.com), and you can create custom builds pretty easily. First of all, you’ll need Grunt and all other dependencies: | ||
|
||
``` | ||
$ cd path/to/animate.css/ | ||
$ sudo npm install | ||
``` | ||
|
||
Next, run `grunt watch` to watch for changes and compile your custom builds. For example, if you want only some of the the “attention seekers”, simply edit the `.animate-config` file to select only the animations you want to use. | ||
|
||
*Note: Safari in Mountion Lion (OS 10.8) has a display glitch with the Flippers. They may not appear at all until the animation is completed, or the page may have other artifacting. One fix is to add overflow: hidden to the parent div.* | ||
```javascript | ||
"attention_seekers": { | ||
"bounce": true, | ||
"flash": false, | ||
"pulse": false, | ||
"shake": true, | ||
"swing": true, | ||
"tada": true, | ||
"wobble": true | ||
} | ||
``` | ||
|
||
##License | ||
## 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. | ||
|
||
##Learn more | ||
You can learn more about animate.css over at http://daneden.me/animate | ||
You can also get in touch via email ([email protected]) or twitter (@_dte) if you need any help or have any issues. | ||
|
||
##Cheat Sheet | ||
|
||
####Attention seekers: | ||
flash | ||
bounce | ||
shake | ||
tada | ||
swing | ||
wobble | ||
pulse | ||
|
||
####Flippers (currently Webkit, Firefox, & IE10 only): | ||
flip | ||
flipInX | ||
flipOutX | ||
flipInY | ||
flipOutY | ||
|
||
####Fading entrances: | ||
fadeIn | ||
fadeInUp | ||
fadeInDown | ||
fadeInLeft | ||
fadeInRight | ||
fadeInUpBig | ||
fadeInDownBig | ||
fadeInLeftBig | ||
fadeInRightBig | ||
|
||
####Fading exits: | ||
fadeOut | ||
fadeOutUp | ||
fadeOutDown | ||
fadeOutLeft | ||
fadeOutRight | ||
fadeOutUpBig | ||
fadeOutDownBig | ||
fadeOutLeftBig | ||
fadeOutRightBig | ||
|
||
####Bouncing entrances: | ||
bounceIn | ||
bounceInDown | ||
bounceInUp | ||
bounceInLeft | ||
bounceInRight | ||
|
||
####Bouncing exits: | ||
bounceOut | ||
bounceOutDown | ||
bounceOutUp | ||
bounceOutLeft | ||
bounceOutRight | ||
|
||
####Rotating entrances: | ||
rotateIn | ||
rotateInDownLeft | ||
rotateInDownRight | ||
rotateInUpLeft | ||
rotateInUpRight | ||
|
||
####Rotating exits: | ||
rotateOut | ||
rotateOutDownLeft | ||
rotateOutDownRight | ||
rotateOutUpLeft | ||
rotateOutUpRight | ||
|
||
####Lightspeed: | ||
lightSpeedIn | ||
lightSpeedOut | ||
|
||
####Specials: | ||
hinge | ||
rollIn | ||
rollOut | ||
|
||
## Other Resources | ||
|
||
- There's a [Ruby gem](https://github.com/camelmasa/animate-rails) available for Animate.css | ||
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. |
Oops, something went wrong.