Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/new demo site #1046

Merged
merged 63 commits into from
May 5, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
82a4268
Simplify & centralize the Animate.css home page. Finally.
daneden Jan 21, 2014
aac33c2
Design tweak
daneden Jan 21, 2014
e8b9e05
Fix Lightspeed demos
daneden Jan 21, 2014
b10fccd
Fix Lightspeed demos (cont.)
daneden Jan 21, 2014
d5d0861
Trigger animation on change as well as click
daneden Jan 29, 2014
ee75b81
Correct jQuery example. Fixes #127
daneden Jan 31, 2014
755f126
Remove Readme on gh-pages to prevent mistakes like ee75b81
daneden Jan 31, 2014
244f9dc
Use animate.min.css because whatever
daneden Jan 31, 2014
83287b8
Update demo page with MS animation JS hooks.
daneden Jan 31, 2014
ec12cc1
Updating home page with rubberBand animation.
mrwillis21 Feb 14, 2014
b02b8d7
Merge pull request #155 from mrwillis21/gh-pages
daneden Feb 15, 2014
ac589b5
Reverse hue animation
daneden Feb 19, 2014
b76b02a
Add readme, use cssmin minified CSS instead of csso
daneden Feb 23, 2014
5d90042
Update gh-pages
daneden Jul 6, 2014
2a1fad0
Remove protocol from urls
daneden Jul 11, 2014
41fd94b
Remove Square Cash link
daneden Sep 1, 2014
fb2f556
Merge branch 'gh-pages' of github.com:daneden/animate.css into gh-pages
daneden Sep 1, 2014
2915633
Updating Gh-page animate.css to the current version
Mar 4, 2015
cf23a42
Updating Gh-page animate.min.css to reflect the current version
Mar 4, 2015
4cf0f2d
Update CSS
daneden Mar 4, 2015
b5926be
Updating Gh-page index.html to the reflect the addition of zooms (in …
Mar 4, 2015
b6141f7
refactoring index.html to mimic the current optgroup styling
Mar 4, 2015
6b5a93d
updated index.html to reflect the standard optgroup styling on slider…
Mar 4, 2015
f80d456
Merging updated version of animate.min.css
Mar 5, 2015
f7e4bd1
Merge branch 'gh-pages' of https://github.com/Gabrielmtn/animate.css …
daneden Mar 5, 2015
79add74
Merge branch 'Gabrielmtn-gh-pages' into gh-pages
daneden Mar 5, 2015
411b7c0
Updated animate.min.css
procodeing May 12, 2015
dfe9957
added jello to options
procodeing May 13, 2015
750a110
Merge pull request #409 from procodeing/gh-pages
daneden May 13, 2015
0dd0bbc
Update CSS
daneden Aug 2, 2015
f51e3ee
Add jackInTheBox to gh-pages (#694)
Jul 10, 2017
9d1a716
fixed the issue of overflow scroll (#740)
khaled-nuur Oct 2, 2017
56631da
Adds heartBeat animation demo (#893)
unigazer Jan 13, 2019
5a7239c
Update animate.min.css to latest version
eltonmesquita Feb 9, 2019
5788792
Updated CSS for current browsers
eltonmesquita Jun 7, 2019
b751661
Updated animate.css
eltonmesquita Jun 7, 2019
d491684
Removed useless test folder
eltonmesquita Jul 11, 2019
8585c44
Added warn about prefers-reduced-motion
eltonmesquita Jul 26, 2019
5f4b066
Merge branch 'dev' into feature/new-demo-site
eltonmesquita Apr 24, 2020
7286658
Adds docs compiler
eltonmesquita Apr 24, 2020
5627476
Adds new base template
eltonmesquita Apr 24, 2020
801657d
Improves the docs compiler
eltonmesquita Apr 24, 2020
ca2522d
Fixes flipOutY animation
eltonmesquita Apr 25, 2020
f57dbba
Updates docs template and build
eltonmesquita Apr 25, 2020
82c7c22
Reorder docs sections
eltonmesquita Apr 25, 2020
1ef93c3
Updates docs animation list template
eltonmesquita Apr 25, 2020
8b711b7
Updates prettier ignore
eltonmesquita Apr 25, 2020
f63cebd
Adds syntax highlight to docs
eltonmesquita Apr 25, 2020
3fffc47
Small fixes to docs content
eltonmesquita Apr 25, 2020
86aa7f3
Updates templates HTML
eltonmesquita Apr 25, 2020
bd53d90
Styles the demo website
eltonmesquita Apr 25, 2020
53977ee
Adds functionality to demo website
eltonmesquita Apr 25, 2020
4607d69
Fixes small website demo issue with medium screens
eltonmesquita Apr 25, 2020
6123019
Adds copy animation to demo site
eltonmesquita Apr 27, 2020
90d4dc3
Renames loop classes to repeat
eltonmesquita May 1, 2020
a619e78
Small adjusts to docs styles
eltonmesquita May 1, 2020
c0b87ce
Updates docs template
eltonmesquita May 1, 2020
1634444
Updates docs improving copy and adding sections
eltonmesquita May 1, 2020
736b154
Reviews the docs copy
eltonmesquita May 4, 2020
7e02691
Fix some issues with demo-site
eltonmesquita May 5, 2020
0bf61f1
Fixes issue with the demo-site playground
eltonmesquita May 5, 2020
d21d31e
Adjusts tooltip on demo-site
eltonmesquita May 5, 2020
236286d
Fix layout issues on mobile and update “close” button for animations …
daneden May 5, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''
---**Describe the bug** A clear and concise description of what the bug is.

name: Bug report about: Create a report to help us improve title: '' labels: '' assignees: '' ---**Describe the bug** A clear and concise description of what the bug is.

**To Reproduce** Steps to reproduce the behavior:

Expand Down
8 changes: 2 additions & 6 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''
---**Is your feature request related to a problem? Please describe.** A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

name: Feature request about: Suggest an idea for this project title: '' labels: '' assignees: '' ---**Is your feature request related to a problem? Please describe.** A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like** A clear and concise description of what you want to happen.

Expand Down
4 changes: 3 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
animate.css
animate.min.css
animate.module.css
animate.compat.css
docs/dist/animate.min.css
2 changes: 2 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# Contributing to Animate.css

Thanks for your interest in contributing to Animate.css! Before contributing, please make sure you understand the guidelines provided here. Animate.css is widely used, so it’s important to maintain a high level of quality and to contribute with the interests of the community in mind.

## Design Guidelines

Animations, like many facets of visual and interaction design, can be highly subjective. Maintaining a consistent library of animations in an active community can be difficult; these design guidelines are designed to help encourage thoughtful criticism of new animations that are proposed for Animate.css.

The animations in Animate.css should follow a few key principles:
Expand Down
245 changes: 9 additions & 236 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,8 @@

[![GitHub Version](https://img.shields.io/github/release/daneden/animate.css.svg?style=for-the-badge)](https://github.com/daneden/animate.css) [![Github Star](https://img.shields.io/github/stars/daneden/animate.css.svg?style=for-the-badge)](https://github.com/daneden/animate.css) [![Github Fork](https://img.shields.io/github/forks/daneden/animate.css.svg?style=for-the-badge)](https://github.com/daneden/animate.css) [![License](https://img.shields.io/github/license/daneden/animate.css.svg?style=for-the-badge)](https://github.com/daneden/animate.css)

> **We need your help!** animate.css v4 is in the work with lots of improvements and some breaking changes, including CSS custom properties support (aka CSS variables) and classes prefix for a safer use. We need **your feedback**! You can follow the development on the [`dev`](https://github.com/daneden/animate.css/tree/dev) branch and give your feedback on the [issue tracker](https://github.com/daneden/animate.css/issues). **Every feedback is welcome!**

## _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.

## Installation

Install with npm:
Expand All @@ -22,244 +18,21 @@ Install with yarn:
yarn add animate.css
```

## Usage

To use animate.css in your website, simply drop the stylesheet into your document's `<head>`, and add the class `animate__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>
```

or use a CDN hosted version by [CDNJS](https://cdnjs.com/libraries/animate.css)

```html
<head>
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.7.2/animate.min.css"
/>
</head>
```

### Animations

To animate an element, add the class `animate__animated` to an element. You can include the class `animate__infinite` for an infinite loop. Finally you need to add one of the following classes to the element (adding the `animate__` prefix before it):

| 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` | `fadeInTopLeft` | `fadeInTopRight` |
| `fadeInBottomLeft` | `fadeInBottomRight` | `fadeOutTopLeft` | `fadeOutTopRight` |
| `fadeOutBottomRight` | `fadeOutBottomLeft` | `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` |
| `backInDown` | `backInLeft` | `backInRight` | `backInUp` |
| `backOutDown` | `backOutLeft` | `backOutRight` | `backOutUp` |
| `heartBeat` |

Full example:

```html
<h1 class="animate__animated animate__infinite animate__bounce animate__delay-2s">Example</h1>
```

[Check out all the animations here!](https://daneden.github.io/animate.css/)

It's possible to change the duration of your animations, add a delay or change the number of times that it plays:

```css
.yourElement {
animation-duration: 3s;
animation-delay: 2s;
animation-iteration-count: infinite;
}
```

## CSS Custom Properties (CSS Variables)

Since version 4, animate.css makes use of custom properties (also known as CSS variables) to define the animations duration, delay and speed. This makes it easy to change all your animations time contrained properties on the fly. It means that you can have a slowmotion or timelapse effect with an one-liner javascript:

```javascript
// All animations will take twice the time to acomplish
document.documentElement.style.setProperty('--animate-duration', '2s');

// All animations will take half the time to acomplish
document.documentElement.style.setProperty('--animate-duration', '.5s');
```

It's possible to overwrite the variables with pure CSS too:

```css
/* This will overide all animations duration */
:root {
--animate-duration: 2s;
}

/* This will overide only this animation duration */
.animate__bounce {
--animate-duration: 3s;
}
```

Even though custom properties are not supported by some older browsers - like IE 10+ - you can use it safely as animate is powered by postcss, providing a proper fallback.

## Usage with Javascript

You can do a whole bunch of other stuff with animate.css when you combine it with Javascript. A simple example:

```javascript
const element = document.querySelector('.my-element');
element.classList.add('animate__animated', 'animate__bounceOutLeft');
```

You can also detect when an animation ends:

```javascript
const element = document.querySelector('.my-element');
element.classList.add('animate__animated', 'animate__bounceOutLeft');

element.addEventListener('animationend', function() {
doSomething();
});
```

You can use this simple function to add and remove the animations:

```javascript
function animateCSS(element, animationName, callback) {
const node = document.querySelector(element);
node.classList.add('animate__animated', animationName);

function handleAnimationEnd() {
node.classList.remove('animate__animated', animationName);
node.removeEventListener('animationend', handleAnimationEnd);
## Getting started

if (typeof callback === 'function') callback();
}

node.addEventListener('animationend', handleAnimationEnd);
}
```

And use it like this:

```javascript
animateCSS('.my-element', 'animate__bounce');

// or
animateCSS('.my-element', 'animate__bounce', function() {
// Do something after animation
});
```

Notice that the examples are using ES6's `const` declaration, dropping support for IE10 and some aging browsers. If you prefer, switch the `const` to `var` declarations and IE10 and some old browsers will get support (they still have to provide [classList](https://developer.mozilla.org/en-US/docs/Web/API/Element/classList) support, so do your [research](https://caniuse.com/#feat=classlist)).

## Setting _Delay_ and _Speed_

### Delay Class

It's possible to add delays directly on the element's class attribute, just like this:

```html
<div class="animate__animated bounce delay-2s">Example</div>
```

| Class Name | Delay Time |
| ------------------- | ---------- |
| `animate__delay-2s` | `2s` |
| `animate__delay-3s` | `3s` |
| `animate__delay-4s` | `4s` |
| `animate__delay-5s` | `5s` |

> _**Note**: The default delays are from 1 second to 5 seconds only. If you need custom delays, add it directly to your own CSS code._

### Slow, Slower, Fast, and Faster Class

It's possible to control the speed of the animation by adding these classes, as a sample below:

```html
<div class="animate__animated animate__bounce animate__faster">Example</div>
```

| Class Name | Speed Time |
| ----------------- | ---------- |
| `animate__slow` | `2s` |
| `animate__slower` | `3s` |
| `animate__fast` | `800ms` |
| `animate__faster` | `500ms` |

> _**Note**: The `animate__animated` class has a default speed of `1s`. If you need custom duration, add it directly to your own CSS code._

### Loop Class

It's possible to control the iteration count of the animation by adding these classes, like below:

```html
<div class="animate__animated animate__bounce animate__loop-2">Example</div>
```

| Class Name | Iteration Count |
| ----------------- | --------------- |
| `animate__loop-1` | `1` |
| `animate__loop-2` | `2` |
| `animate__loop-3` | `3` |

> _**Note**: The `animate__loop` class has a default iteration count of `1`. If you need custom iteration count, add it directly to your own CSS code._

## Custom Builds

Animate.css is powered by npm/npx, postcss + postcss-preset-env, which means you can create custom builds pretty easily, using future CSS features safely. First of all, you’ll need Node and all other dependencies:

```sh
cd path/to/animate.css/
npm install
```

Next, run `npm start` to compile your custom builds. For example, if you want only some of the “attention seekers”, simply edit the `./source/animate.css` file and keep only the animations `@import` you want to use.

```css
@import 'attention_seekers/bounce.css';
@import 'attention_seekers/flash.css';
@import 'attention_seekers/pulse.css';
@import 'attention_seekers/rubberBand.css';
@import 'attention_seekers/shake.css';
@import 'attention_seekers/headShake.css';
@import 'attention_seekers/swing.css';
@import 'attention_seekers/tada.css';
@import 'attention_seekers/wobble.css';
@import 'attention_seekers/jello.css';
@import 'attention_seekers/heartBeat.css';
```

It's possible to change animate's prefix on your custom build. Just change the `animateConfig`'s `prefix` property and rebuild it with `npm start`:

```json
"animateConfig": {
"prefix": "ani__"
},
```
You can find the Animate.css documentation on the [website](http://daneden.github.io/animate.css).

## Accessibility

Animate.css supports the [`prefers-reduced-motion` media query](https://webkit.org/blog/7551/responsive-design-for-motion/) so that users with motion sensitivity can opt out of animations. On supported platforms (currently all the majors browsers and OS), users can select "reduce motion" on their operating system preferences and it will turn off CSS transitions for them without any further work required.

## Core team

| ![](https://avatars2.githubusercontent.com/u/439365?s=460&u=512b4cc5324938ae40bbb8f3b7769d335953cd3a&v=4) | ![](https://avatars2.githubusercontent.com/u/5007208?s=460&u=418401ee605824272e5dcb955fd64ea24546a857&v=4) | ![](https://avatars1.githubusercontent.com/u/15052701?s=460&u=9e58364978379536d3f26c4ce5cae1a2a449a0e4&v=4) |
| --- | --- | --- |
| [Daniel Eden](https://github.com/daneden) | [Elton Mesquita](https://github.com/eltonmesquita) | [Waren Gonzaga](https://github.com/WarenGonzaga) |
| Animate.css creator | Maintainer | Core contributor |

## License

Animate.css is licensed under the MIT license. <https://opensource.org/licenses/MIT>
Expand Down
2 changes: 1 addition & 1 deletion animate.compat.css

Large diffs are not rendered by default.

Loading