Compare commits

..

No commits in common. "main" and "3.5.2" have entirely different histories.
main ... 3.5.2

130 changed files with 1516 additions and 8782 deletions

View File

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

View File

@ -1,74 +0,0 @@
name: Report a Bug
description: Found a bug? Let us know!
labels: 'bug'
body:
# bug description
- type: textarea
id: descrption
attributes:
label: Describe The Bug
description: "A clear and concise description of what the bug is."
validations:
required: true
# steps to reproduce
- type: textarea
id: steps
attributes:
label: Steps To Reproduce
description: "Steps to reproduce the behavior."
placeholder: |
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
validations:
required: false
# expected behavior
- type: textarea
id: expected
attributes:
label: Expected Behavior
description: "A clear and concise description of what you expected to happen."
validations:
required: false
# screenshots
- type: textarea
id: screenshots
attributes:
label: Screenshots
description: "If applicable, add screenshots to help explain your problem."
validations:
required: false
# desktop
- type: textarea
id: desktop
attributes:
label: Desktop
description: "Please complete the following information."
placeholder: |
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
validations:
required: false
# smartphone
- type: textarea
id: mobile
attributes:
label: Smartphone
description: "Please complete the following information."
placeholder: |
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
validations:
required: false
# additional context
- type: textarea
id: additional-context
attributes:
label: Additional Context
description: "Add any other context about the problem here."
validations:
required: false

View File

@ -1,36 +0,0 @@
name: Feature Request
description: Have a feature request? Let us know!
labels: 'feature request'
body:
# problem
- type: textarea
id: problem
attributes:
label: Is your feature request related to a problem? Please describe.
description: "A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]"
validations:
required: true
# solution
- type: textarea
id: solution
attributes:
label: Describe the solution you'd like.
description: "A clear and concise description of what you want to happen."
validations:
required: true
# alternative
- type: textarea
id: alternative
attributes:
label: Describe alternatives you've considered.
description: "A clear and concise description of any alternative solutions or features you've considered."
validations:
required: true
# additional context
- type: textarea
id: additional-context
attributes:
label: Additional Context
description: "Add any other context about the problem here."
validations:
required: false

View File

@ -1,10 +0,0 @@
version: 2
updates:
- package-ecosystem: npm
directory: "/"
schedule:
interval: daily
open-pull-requests-limit: 10
reviewers:
- "daneden"
- "eltonmesquita"

View File

@ -1,71 +0,0 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"
on:
push:
branches: [ main ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ main ]
schedule:
- cron: '20 21 * * 6'
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: [ 'javascript' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
# Learn more:
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
steps:
- name: Checkout repository
uses: actions/checkout@v2
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1
# Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language
#- run: |
# make bootstrap
# make release
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1

9
.gitignore vendored
View File

@ -1,11 +1,4 @@
.db
.DS_Store
.idea
.ini
.log
.sass-cache
node_modules/
.DS_Store
test/
npm-shrinkwrap.json
package-lock.json
.jshintrc

1
.husky/.gitignore vendored
View File

@ -1 +0,0 @@
_

View File

@ -1,4 +0,0 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
npx lint-staged

View File

@ -1,4 +0,0 @@
animate.css
animate.min.css
animate.compat.css
docs/dist/animate.min.css

View File

@ -1,6 +0,0 @@
{
"bracketSpacing": false,
"proseWrap": "never",
"singleQuote": true,
"trailingComma": "all"
}

View File

@ -1,6 +0,0 @@
language: node_js
node_js:
- "10"
before_script:
- npm install
script: npm run start

View File

@ -1,47 +0,0 @@
# Contributor Covenant Code of Conduct
## Our Pledge
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
## Our Standards
Examples of behavior that contributes to creating a positive environment include:
- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members
Examples of unacceptable behavior by participants include:
- The use of sexualized language or imagery and unwelcome sexual attention or advances
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or electronic address, without explicit permission
- Other conduct which could reasonably be considered inappropriate in a professional setting
## Our Responsibilities
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
## Scope
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at animate@eltonmesquita.com. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
[homepage]: https://www.contributor-covenant.org
For answers to common questions about this code of conduct, see https://www.contributor-covenant.org/faq

View File

@ -1,31 +0,0 @@
# 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 its 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:
- **Animations should be subtle.** Avoid creating animations that involve large translations, or span a natural duration of longer than 1 second.
- **Animations should be tolerable.** Related to subtlety, animations should be tolerable—seeing them repeatedly should not become too annoying or overbearing.
- **Animations should not interfere with document flow or control/input availability.** In other words, the absence of an animation should never reduce usability of a product: they should be non-critical and seen as “progressive enhancements”. Avoid animations that change properties such as `position` or `display`.
- **Animations should be helpful.** They should be designed to guide users to a point of interest, ease natural reading order, or to communicate relationships between elements.
- **Animations should feel familiar.** Avoid introducing animations that feel out-of-place compared to the existing set.
- **Animations should feel natural.** Animations should reflect, as much as is reasonable, motion that occurs in natural physics. Avoid extreme timing functions, and model animations on real-world events.
## Code Styling
1. Match the naming convention (camelCase, categorized [fades, bounces, etc])
2. Indent with two spaces
3. End each file with a blank line
4. Make sure you have an editorconfig plugin/extension enabled in your editor and all the dependencies installed so editorconfig and prettier can automatically format your code when committing.
## How To Contribute
1. [Fork](https://help.github.com/articles/fork-a-repo/) the project
2. Create a new topic branch on your local forked copy
3. Push your topic branch up to your fork
4. Create a [pen](https://codepen.io/) demonstrating what your change will do.
5. [Open a Pull Request](https://help.github.com/articles/about-pull-requests/) with a clear title and description against the `main` branch.

46
LICENSE
View File

@ -1,33 +1,21 @@
Animate.css Copyright 2021 Daniel Eden (“Licensor”)
The MIT License (MIT)
Hippocratic License Version Number: 2.1.
Copyright (c) 2016 Daniel Eden
Purpose. The purpose of this License is for the Licensor named above to permit the Licensee (as defined below) broad permission, if consistent with Human Rights Laws and Human Rights Principles (as each is defined below), to use and work with the Software (as defined below) within the full scope of Licensors copyright and patent rights, if any, in the Software, while ensuring attribution and protecting the Licensor from liability.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
Permission and Conditions. The Licensor grants permission by this license (“License”), free of charge, to the extent of Licensors rights under applicable copyright and patent law, to any person or entity (the “Licensee”) obtaining a copy of this software and associated documentation files (the “Software”), to do everything with the Software that would otherwise infringe (i) the Licensors copyright in the Software or (ii) any patent claims to the Software that the Licensor can license or becomes able to license, subject to all of the following terms and conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
* Acceptance. This License is automatically offered to every person and entity subject to its terms and conditions. Licensee accepts this License and agrees to its terms and conditions by taking any action with the Software that, absent this License, would infringe any intellectual property right held by Licensor.
* Notice. Licensee must ensure that everyone who gets a copy of any part of this Software from Licensee, with or without changes, also receives the License and the above copyright notice (and if included by the Licensor, patent, trademark and attribution notice). Licensee must cause any modified versions of the Software to carry prominent notices stating that Licensee changed the Software. For clarity, although Licensee is free to create modifications of the Software and distribute only the modified portion created by Licensee with additional or different terms, the portion of the Software not modified must be distributed pursuant to this License. If anyone notifies Licensee in writing that Licensee has not complied with this Notice section, Licensee can keep this License by taking all practical steps to comply within 30 days after the notice. If Licensee does not do so, Licensees License (and all rights licensed hereunder) shall end immediately.
* Compliance with Human Rights Principles and Human Rights Laws.
1. Human Rights Principles.
(a) Licensee is advised to consult the articles of the United Nations Universal Declaration of Human Rights and the United Nations Global Compact that define recognized principles of international human rights (the “Human Rights Principles”). Licensee shall use the Software in a manner consistent with Human Rights Principles.
(b) Unless the Licensor and Licensee agree otherwise, any dispute, controversy, or claim arising out of or relating to (i) Section 1(a) regarding Human Rights Principles, including the breach of Section 1(a), termination of this License for breach of the Human Rights Principles, or invalidity of Section 1(a) or (ii) a determination of whether any Law is consistent or in conflict with Human Rights Principles pursuant to Section 2, below, shall be settled by arbitration in accordance with the Hague Rules on Business and Human Rights Arbitration (the “Rules”); provided, however, that Licensee may elect not to participate in such arbitration, in which event this License (and all rights licensed hereunder) shall end immediately. The number of arbitrators shall be one unless the Rules require otherwise.
Unless both the Licensor and Licensee agree to the contrary: (1) All documents and information concerning the arbitration shall be public and may be disclosed by any party; (2) The repository referred to under Article 43 of the Rules shall make available to the public in a timely manner all documents concerning the arbitration which are communicated to it, including all submissions of the parties, all evidence admitted into the record of the proceedings, all transcripts or other recordings of hearings and all orders, decisions and awards of the arbitral tribunal, subject only to the arbitral tribunal's powers to take such measures as may be necessary to safeguard the integrity of the arbitral process pursuant to Articles 18, 33, 41 and 42 of the Rules; and (3) Article 26(6) of the Rules shall not apply.
2. Human Rights Laws. The Software shall not be used by any person or entity for any systems, activities, or other uses that violate any Human Rights Laws. “Human Rights Laws” means any applicable laws, regulations, or rules (collectively, “Laws”) that protect human, civil, labor, privacy, political, environmental, security, economic, due process, or similar rights; provided, however, that such Laws are consistent and not in conflict with Human Rights Principles (a dispute over the consistency or a conflict between Laws and Human Rights Principles shall be determined by arbitration as stated above). Where the Human Rights Laws of more than one jurisdiction are applicable or in conflict with respect to the use of the Software, the Human Rights Laws that are most protective of the individuals or groups harmed shall apply.
3. Indemnity. Licensee shall hold harmless and indemnify Licensor (and any other contributor) against all losses, damages, liabilities, deficiencies, claims, actions, judgments, settlements, interest, awards, penalties, fines, costs, or expenses of whatever kind, including Licensors reasonable attorneys fees, arising out of or relating to Licensees use of the Software in violation of Human Rights Laws or Human Rights Principles.
* Failure to Comply. Any failure of Licensee to act according to the terms and conditions of this License is both a breach of the License and an infringement of the intellectual property rights of the Licensor (subject to exceptions under Laws, e.g., fair use). In the event of a breach or infringement, the terms and conditions of this License may be enforced by Licensor under the Laws of any jurisdiction to which Licensee is subject. Licensee also agrees that the Licensor may enforce the terms and conditions of this License against Licensee through specific performance (or similar remedy under Laws) to the extent permitted by Laws. For clarity, except in the event of a breach of this License, infringement, or as otherwise stated in this License, Licensor may not terminate this License with Licensee.
* Enforceability and Interpretation. If any term or provision of this License is determined to be invalid, illegal, or unenforceable by a court of competent jurisdiction, then such invalidity, illegality, or unenforceability shall not affect any other term or provision of this License or invalidate or render unenforceable such term or provision in any other jurisdiction; provided, however, subject to a court modification pursuant to the immediately following sentence, if any term or provision of this License pertaining to Human Rights Laws or Human Rights Principles is deemed invalid, illegal, or unenforceable against Licensee by a court of competent jurisdiction, all rights in the Software granted to Licensee shall be deemed null and void as between Licensor and Licensee. Upon a determination that any term or provision is invalid, illegal, or unenforceable, to the extent permitted by Laws, the court may modify this License to affect the original purpose that the Software be used in compliance with Human Rights Principles and Human Rights Laws as closely as possible. The language in this License shall be interpreted as to its fair meaning and not strictly for or against any party.
* Disclaimer. TO THE FULL EXTENT ALLOWED BY LAW, THIS SOFTWARE COMES “AS IS,” WITHOUT ANY WARRANTY, EXPRESS OR IMPLIED, AND LICENSOR AND ANY OTHER CONTRIBUTOR SHALL NOT BE LIABLE TO ANYONE FOR ANY DAMAGES OR OTHER LIABILITY ARISING FROM, OUT OF, OR IN CONNECTION WITH THE SOFTWARE OR THIS LICENSE, UNDER ANY KIND OF LEGAL CLAIM.
This Hippocratic License is an Ethical Source license (https://ethicalsource.dev) and is offered for use by licensors and licensees at their own risk, on an “AS IS” basis, and with no warranties express or implied, to the maximum extent permitted by Laws.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

200
README.md
View File

@ -1,48 +1,192 @@
# Animate.css
#Animate.css
*Just-add-water CSS animation*
[![GitHub Version](https://img.shields.io/github/release/animate-css/animate.css.svg?style=for-the-badge)](https://github.com/animate-css/animate.css/releases) [![Github Star](https://img.shields.io/github/stars/animate-css/animate.css.svg?style=for-the-badge)](https://github.com/animate-css/animate.css/stargazers) [![Github Fork](https://img.shields.io/github/forks/animate-css/animate.css.svg?style=for-the-badge)](https://github.com/animate-css/animate.css/network/members) [![License](https://img.shields.io/badge/license-hippocratic%20license-orange.svg?longCache=true&style=for-the-badge)](https://github.com/animate-css/animate.css/blob/main/LICENSE)
`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.
> If you need the old docs - v3.x.x and under - you can find it [here](https://github.com/animate-css/animate.css/tree/a8d92e585b1b302f7749809c3308d5e381f9cb17).
##Basic Usage
1. Include the stylesheet on your document's `<head>`
## _Just-add-water CSS animation_
```html
<head>
<link rel="stylesheet" href="animate.min.css">
</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.
## Installation
3. Finally you need to add one of the following classes:
Install with npm:
* `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`
* `rollIn`
* `rollOut`
* `zoomIn`
* `zoomInDown`
* `zoomInLeft`
* `zoomInRight`
* `zoomInUp`
* `zoomOut`
* `zoomOutDown`
* `zoomOutLeft`
* `zoomOutRight`
* `zoomOutUp`
* `slideInDown`
* `slideInLeft`
* `slideInRight`
* `slideInUp`
* `slideOutDown`
* `slideOutLeft`
* `slideOutRight`
* `slideOutUp`
```shell
npm install animate.css --save
Full example:
```html
<h1 class="animated infinite bounce">Example</h1>
```
Install with yarn:
[Check out all the animations here!](https://daneden.github.io/animate.css/)
```shell
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 `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>
```
## Getting Started
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:
You can find the Animate.css documentation on the [website](https://animate.style/).
```javascript
$('#yourElement').addClass('animated bounceOutLeft');
```
## Accessibility
You can also detect when an animation ends:
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.
<!--
Before you make changes to this file, you should know that $('#yourElement').one() is *NOT A TYPO*
## Core Team
http://api.jquery.com/one/
-->
| ![Daniel Eden](https://avatars2.githubusercontent.com/u/439365?s=460&u=512b4cc5324938ae40bbb8f3b7769d335953cd3a&v=4) | ![Elton Mesquita](https://avatars2.githubusercontent.com/u/5007208?s=460&u=418401ee605824272e5dcb955fd64ea24546a857&v=4) | ![Waren Gonzaga](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 |
```javascript
$('#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/).
You can also extend jQuery to add a function that does it all for you:
```javascript
$.fn.extend({
animateCss: function (animationName) {
var animationEnd = 'webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend';
$(this).addClass('animated ' + animationName).one(animationEnd, function() {
$(this).removeClass('animated ' + animationName);
});
}
});
```
And use it like this:
```javascript
$('#yourElement').animateCss('bounce');
```
You can change the duration of your animations, add a delay or change the number of times that it plays:
```css
#yourElement {
-vendor-animation-duration: 3s;
-vendor-animation-delay: 2s;
-vendor-animation-iteration-count: infinite;
}
```
*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
$ cd path/to/animate.css/
$ sudo npm install
```
Next, run `gulp` to compile your custom builds. For example, if you want only some of the the “attention seekers”, simply edit the `animate-config.json` file to select only the animations you want to use.
```javascript
"attention_seekers": {
"bounce": true,
"flash": false,
"pulse": false,
"shake": true,
"headShake": true,
"swing": true,
"tada": true,
"wobble": true,
"jello":true
}
```
## License
Animate.css is licensed under the [Hippocratic License](http://firstdonoharm.dev).
## Code of Conduct
This project and everyone participating in it is governed by the [Contributor Covenant Code of Conduct](CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code. Please report unacceptable behavior to [animate@eltonmesquita.com](mailto:animate@eltonmesquita.com).
Animate.css is licensed under the MIT license. (http://opensource.org/licenses/MIT)
## Contributing
Pull requests are the way to go here. We 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](https://codepen.io). That **last one is important**.
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 +0,0 @@
<!-- markdownlint-disable MD041 -->
If you discover a security issue in this repository, please contact us with this email animate@eltonmesquita.com.
Thanks for helping make our open-source projects safe for everyone, we really appreciate it.

120
animate-config.json Normal file
View File

@ -0,0 +1,120 @@
{
"attention_seekers": [
"bounce",
"flash",
"pulse",
"rubberBand",
"shake",
"headShake",
"swing",
"tada",
"wobble",
"jello"
],
"bouncing_entrances": [
"bounceIn",
"bounceInDown",
"bounceInLeft",
"bounceInRight",
"bounceInUp"
],
"bouncing_exits": [
"bounceOut",
"bounceOutDown",
"bounceOutLeft",
"bounceOutRight",
"bounceOutUp"
],
"fading_entrances": [
"fadeIn",
"fadeInDown",
"fadeInDownBig",
"fadeInLeft",
"fadeInLeftBig",
"fadeInRight",
"fadeInRightBig",
"fadeInUp",
"fadeInUpBig"
],
"fading_exits": [
"fadeOut",
"fadeOutDown",
"fadeOutDownBig",
"fadeOutLeft",
"fadeOutLeftBig",
"fadeOutRight",
"fadeOutRightBig",
"fadeOutUp",
"fadeOutUpBig"
],
"flippers": [
"flip",
"flipInX",
"flipInY",
"flipOutX",
"flipOutY"
],
"lightspeed": [
"lightSpeedIn",
"lightSpeedOut"
],
"rotating_entrances": [
"rotateIn",
"rotateInDownLeft",
"rotateInDownRight",
"rotateInUpLeft",
"rotateInUpRight"
],
"rotating_exits": [
"rotateOut",
"rotateOutDownLeft",
"rotateOutDownRight",
"rotateOutUpLeft",
"rotateOutUpRight"
],
"specials": [
"hinge",
"rollIn",
"rollOut"
],
"zooming_entrances": [
"zoomIn",
"zoomInDown",
"zoomInLeft",
"zoomInRight",
"zoomInUp"
],
"zooming_exits": [
"zoomOut",
"zoomOutDown",
"zoomOutLeft",
"zoomOutRight",
"zoomOutUp"
],
"sliding_entrances": [
"slideInDown",
"slideInLeft",
"slideInRight",
"slideInUp"
],
"sliding_exits": [
"slideOutDown",
"slideOutLeft",
"slideOutRight",
"slideOutUp"
]
}

File diff suppressed because one or more lines are too long

2524
animate.css vendored

File diff suppressed because it is too large Load Diff

13
animate.min.css vendored Executable file → Normal file

File diff suppressed because one or more lines are too long

11
bower.json Normal file
View File

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

View File

@ -1 +0,0 @@
animate.style

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

File diff suppressed because it is too large Load Diff

View File

@ -1,27 +0,0 @@
import buildDocsIndex from './modules/buildDocsIndex.mjs';
import playground from './modules/playground.mjs';
import startAnimations from './modules/startAnimations.mjs';
import toggleOnClick from './modules/toggle.mjs';
import darkModeControl from './modules/darkMode.mjs';
buildDocsIndex();
playground();
darkModeControl();
toggleOnClick('.callout-showList', 'html', 'animationList-active');
toggleOnClick('.callout-hideList', 'html', 'animationList-active');
toggleOnClick('.hamburger', 'html', 'hamburger-active');
toggleOnClick('.docs-index', 'html', 'hamburger-active');
requestAnimationFrame(startAnimations);
document.querySelectorAll('.copy-icon').forEach(icon => {
icon.addEventListener('click', () => {
icon.classList.add('copied');
document.querySelector('.copied .tooltip').textContent = 'Copied!';
setTimeout(() => {
icon.children[0].textContent = 'Copy class name to clipboard'
icon.classList.remove('copied')
}, 750)
})
})

View File

@ -1,37 +0,0 @@
/**
Docs index
*/
const indexItemTemplate = (item = '', id) => `
<li class="docs-indexItem"><a href="#${id}" title="${item}">${item}</a></li>
`
const indexList = (sections = [], container = '.sidebar', heading = 'h2') => {
const containerEl = document.querySelector(container)
const list = document.createElement('ul')
const children = sections.map(section => {
const title = section.querySelector(heading)
const id = section.getAttribute('id')
return title && indexItemTemplate(title.innerText, id)
})
list.classList.add('docs-index')
list.innerHTML = children.join('\n')
containerEl.insertAdjacentElement('beforeend', list)
return list
}
const buildDocsIndex = (docs = '#documentation', docSection = '[class*="docSection-"]', titles = 'h2') => {
const docsEl = document.querySelector(docs)
const sections = [...docsEl.querySelectorAll(docSection)]
const list = indexList(sections)
return list
}
export default buildDocsIndex

View File

@ -1,20 +0,0 @@
const darkModeControl = () => {
const darkCheck = document.getElementById('night-light-checkbox');
darkCheck.addEventListener('click', () => {
if (darkCheck.checked) {
document.body.classList.add('dark');
localStorage.setItem('animate-css', 'dark');
} else {
document.body.classList.remove('dark');
localStorage.removeItem('animate-css');
}
})
if (localStorage.getItem('animate-css')) {
document.body.className = 'dark';
darkCheck.checked = true;
}
}
export default darkModeControl;

View File

@ -1,46 +0,0 @@
/**
Animation playground
*/
const clearAll = (items = [], className = 'active') => {
items.forEach((item) => item.classList.remove(className));
};
const setEndListener = (target, defaultClass) => {
target.addEventListener('animationend', (e) => {
target.setAttribute('class', defaultClass);
document.documentElement.classList.remove('isPlaying');
});
};
const playground = (
container = '.animation-list',
item = '.animation-item',
target = '.callout-title',
) => {
const containerEl = document.querySelector(container);
const items = [...containerEl.querySelectorAll(item)];
const targetEl = document.querySelector(target);
setEndListener(targetEl, target.replace('.', ''));
containerEl.addEventListener('click', (e) => {
const el = e.target
if(el.classList.contains('animation-item--title')) {
clearAll(items);
const animation = `animate__${el.parentElement.getAttribute('data-animation')}`;
targetEl.classList.add('animate__animated', animation);
document.documentElement.classList.add('isPlaying');
document.documentElement.classList.remove('animationList-active');
}
if (el.classList.contains('copy-icon')) {
const animation = `animate__${el.parentElement.getAttribute('data-animation')}`;
navigator.clipboard.writeText(animation);
}
});
};
export default playground;

View File

@ -1,18 +0,0 @@
/**
Slows animations
*/
const slowDownAnimations = (target) => {
const targetEl = document.querySelector(target)
const doc = document.documentElement
targetEl.addEventListener('click', () => {
const currentDuration = getComputedStyle(document.documentElement)
.getPropertyValue('--animate-duration')
const newDuration = currentDuration === '1s' ? '2s' : '1s'
document.documentElement.style.setProperty('--animate-duration', newDuration);
})
}
export default slowDownAnimations

View File

@ -1,23 +0,0 @@
/**
Intro animation
*/
const startAnimation = () => {
const title = document.querySelector('.callout-title')
const subTitle = document.querySelector('.callout-subtitle')
const sidebar = document.querySelector('.animation-list')
const button = document.querySelector('.callout-showList')
const titleAnimation = 'zoomInDown'
const subTitleAnimation = 'zoomInDown'
const buttonAnimation = 'zoomInUp'
const sidebarAnimation = 'fadeInRight'
title.classList.add('animate__animated', `animate__${titleAnimation}`)
subTitle.classList.add('animate__animated', `animate__${subTitleAnimation}`)
button.classList.add('animate__animated', `animate__${buttonAnimation}`)
sidebar.classList.add('animate__animated', `animate__${sidebarAnimation}`)
}
export default startAnimation

View File

@ -1,14 +0,0 @@
/**
Mobile animation list
*/
const toggleOnClick = (el, target, className) => {
const element = document.querySelector(el)
const targetEl = document.querySelector(target)
element.addEventListener('click', e => {
targetEl.classList.toggle(className)
})
}
export default toggleOnClick

View File

@ -1,739 +0,0 @@
/*-----------------------------------*\
$BASE
\*-----------------------------------*/
:root {
--c-main: #351c75;
--c-secondary: #e69138;
--c-dark: #333;
--c-background: #fce5cd;
--c-background-dark: #f7d7b5;
}
html,
body {
margin: 0;
padding: 0;
}
html {
scroll-behavior: smooth;
color: var(--c-dark);
font-size: 100%;
font-family: 'Work Sans', sans-serif;
line-height: 1.2;
}
@media screen and (min-width: 700px) {
html {
font-size: 112.5%;
line-height: 1.35;
}
}
*,
* *,
*::before,
*::after {
box-sizing: border-box;
}
img {
max-width: 100%;
height: auto;
}
iframe {
max-width: 100%;
}
a,
a:visited {
color: var(--c-main);
}
pre,
table {
display: block;
max-width: 100%;
overflow-x: auto;
}
code {
font-size: 1em;
background: var(--c-background);
}
pre {
padding: 1rem;
background-color: var(--c-dark);
border-radius: 0.25em;
color: #fff;
}
pre code {
background-color: transparent;
font-size: 0.8rem !important;
}
/*-----------------------------------*\
$TYPOGRAPHY
\*-----------------------------------*/
p,
ul,
ol,
hr,
table,
pre,
h1,
h2,
h3,
h4,
h5,
h6 {
margin-top: 1.5em;
margin-bottom: 0;
}
p {
margin-bottom: 1.5rem;
}
h1,
h2,
h3,
h4,
h5,
h6 {
color: var(--c-main);
}
h1 {
font-size: 3.998rem;
}
h2 {
font-size: 1.999rem;
}
h3 {
font-size: 1.414rem;
}
h4 {
font-size: 1.25rem;
}
h5 {
font-size: 1rem;
}
/*-----------------------------------*\
$GENERICS
\*-----------------------------------*/
.button {
padding: 0.4em 1em;
color: var(--c-main);
border-radius: 4px;
border: 2px solid var(--c-main);
background: transparent;
font-family: inherit;
font-size: 0.9rem;
text-decoration: none;
}
.warning {
padding: 1rem;
color: #000;
background: var(--c-background-dark);
border-radius: 0.25em;
font-style: italic;
}
blockquote {
border-left: 6px solid var(--c-secondary);
padding-left: 1rem;
margin-left: 0;
}
/*-----------------------------------*\
$INTRO
\*-----------------------------------*/
.intro {
position: relative;
display: grid;
grid-template-columns: [callout] 1fr;
grid-template-rows: 1fr auto;
grid-column-gap: 0;
grid-row-gap: 1rem;
column-gap: 0;
row-gap: 1rem;
grid-template-areas:
'callout animation-list'
'footer aimation-list';
max-width: 100%;
height: calc(100vh - 2.55rem);
overflow: hidden;
background-color: var(--c-background);
}
@media (min-width: 700px) {
.intro {
height: calc(100vh - 2.8rem);
grid-column-gap: 1rem;
column-gap: 1rem;
grid-template-columns: [callout] 1fr [sidebar] 250px;
}
}
.callout {
grid-area: callout;
align-self: center;
justify-self: center;
text-align: center;
}
.callout-title {
margin-bottom: 0;
animation-delay: 0.25s;
font-size: 4rem;
font-size: min(14vw, 4rem);
}
@media (min-width: 700px) {
.callout-title {
animation-delay: 0s;
}
}
.callout-subtitle {
margin-top: 0;
animation-delay: 0.3s;
color: var(--c-secondary);
font-size: 1.3333rem;
font-size: min(10vw, 1.3333rem);
}
.callout-showList {
margin-top: 2rem;
animation-delay: 0.5s;
}
@media (min-width: 700px) {
.callout-showList {
display: none;
}
}
@media (min-width: 1000px) {
.callout-hideList {
display: none;
}
}
.animation-list {
position: absolute;
top: 0;
left: 100%;
height: 100%;
z-index: 90;
grid-area: animation-list;
grid-row: 1 / 3;
overflow-y: auto;
padding: 2rem;
animation-delay: 0.7s;
animation-fill-mode: backwards;
transition: transform 0.2s ease-out;
background-color: var(--c-background-dark);
}
.animationList-active .animation-list {
transform: translateX(-100%);
}
@media (min-width: 700px) {
.animation-list {
position: relative;
left: auto;
transform: none !important;
}
}
.intro-footer {
grid-area: footer;
justify-self: center;
padding-bottom: 1rem;
font-size: 0.75rem;
text-align: center;
}
.animation-item {
cursor: pointer;
display: flex;
justify-content: space-between;
}
.animation-item--title {
width: 100%;
}
.tooltip {
position: absolute;
bottom: calc(100% + 0.76em);
right: -1em;
padding: 0.5em 0.75em;
background-color: var(--c-main);
color: #fff;
border-radius: 4px;
line-height: 1;
white-space: nowrap;
visibility: hidden;
}
.tooltip::before {
content: '';
position: absolute;
top: 100%;
right: 1.1em;
width: 0;
height: 0;
border-style: solid;
border-width: 6px 4px 0 4px;
border-color: var(--c-main) transparent transparent transparent;
}
.copy-icon {
position: relative;
height: 10px;
border: 1px solid rgba(0, 0, 0, 0.3);
align-self: center;
outline: none;
cursor: pointer;
background: none;
background: #f7d7b5;
visibility: hidden;
}
.copy-icon::before {
content: '';
position: absolute;
right: -4px;
top: -4px;
width: 120%;
height: 120%;
border: 1px solid rgba(0, 0, 0, 0.3);
z-index: -1;
}
.animation-item:hover .copy-icon {
visibility: visible;
}
.animation-item .copy-icon:hover,
.animation-item .copy-icon:hover::before {
border-color: black;
}
.copy-icon:hover .tooltip {
visibility: visible;
}
.animation-group,
.animation-title {
font-size: 1rem;
}
.animation-title {
margin-bottom: 0.2em;
color: var(--c-dark);
}
.animation-group {
margin: 0;
padding: 0;
list-style: none;
line-height: 1.4;
}
/*-----------------------------------*\
$DOCS
\*-----------------------------------*/
.container {
gap: 1rem;
margin: 0 auto;
max-width: 100%;
}
@media (min-width: 1000px) {
.container {
display: grid;
grid-template-rows: 1fr;
grid-template-columns: calc(100% - 300px - 1rem) 300px;
}
}
@media (min-width: 1520px) {
.container {
grid-template-rows: 1fr;
grid-template-columns: 1fr 1100px 2fr;
}
}
.docs {
position: relative;
}
.docs-header {
position: relative;
padding: 0.5rem 0;
background-color: var(--c-main);
z-index: 100;
}
.docs-mainTitle {
grid-column: 1 / 2;
padding-left: 1rem;
margin-top: 0;
font-size: 1.3333rem;
}
.docs-mainTitle a {
color: var(--c-secondary);
text-decoration: none;
}
@media (min-width: 1520px) {
.docs-mainTitle {
grid-column: 2 / 3;
}
}
.meta {
padding-left: 2rem;
margin-top: 1rem;
}
.content {
padding: 0 1rem;
margin-bottom: 2rem;
}
@media (min-width: 1520px) {
.content {
grid-column: 2 / 3;
}
}
.hamburger {
--size: 30px;
display: flex;
align-items: center;
justify-content: center;
position: sticky;
top: 2rem;
left: 100%;
width: var(--size);
height: var(--size);
background-color: var(--c-secondary);
transition: transform 0.2s ease-out;
text-align: center;
}
.hamburger-active .hamburger {
transform: translateX(-240px);
}
@media (min-width: 1000px) {
.hamburger {
display: none;
}
}
.sidebar {
position: fixed;
top: 0;
left: 100%;
z-index: 100;
width: 240px;
height: 100%;
padding-right: 1rem;
background: var(--c-background-dark);
transition: transform 0.2s ease-out;
}
.hamburger-active .sidebar {
transform: translateX(-100%);
}
@media (min-width: 1000px) {
.sidebar {
position: static;
width: auto;
height: auto;
}
.hamburger-active .sidebar {
transform: none;
}
}
.icon-github {
display: inline-block;
margin-right: 0.3em;
}
.docs-index {
top: 1rem;
padding-left: 2rem;
list-style: none;
}
@media (min-width: 1000px) {
.docs-index {
position: sticky;
}
}
.docs-indexItem {
margin-bottom: 0.4rem;
}
.edit-github {
font-size: 0.75rem;
text-align: right;
}
[class*='docSection'] {
border-bottom: 1px solid #eaeaea;
}
[class*='docSection']:last-of-type {
border-bottom: 0px;
}
.docSection-contributors table {
text-align: center;
}
.docSection-contributors table th,
.docSection-contributors table td {
padding: 0 1rem;
}
.docSection-contributors table img {
width: 150px;
border-radius: 100%;
}
/*-----------------------------------*\
$FOOTER
\*-----------------------------------*/
.main-footer {
padding: 1rem;
background-color: var(--c-main);
color: #fff;
font-size: 0.75rem;
text-align: center;
}
.main-footer p {
margin: 0;
}
.main-footer a {
color: #fff;
}
/*-----------------------------------*\
$REDUCED MOTION BANNER
\*-----------------------------------*/
.motionless__banner a {
color: #fff;
}
.motionless__banner {
display: none;
position: fixed;
bottom: 0;
left: 0;
z-index: 150;
width: 100%;
padding: 1rem;
background: #333;
color: #fff;
border-top: 2px solid #ff5722;
text-align: center;
}
.motionless__paragraph {
margin: 0;
}
@media (print), (prefers-reduced-motion: reduce) {
.motionless__banner {
display: block;
}
}
.docs {
text-align: left;
}
.animation-list {
text-align: left;
}
/*-----------------------------------*\
$DARK-MODE
\*-----------------------------------*/
.night-light-label #night-light-checkbox {
position: absolute;
visibility: hidden;
}
.night-light-label {
display: block;
margin: 20px 0;
height: 31px;
width: 60px;
border: 2px solid #4672fe;
border-radius: 30px;
position: relative;
cursor: pointer;
}
.night-light-label .night-light-ball {
position: absolute;
width: 25px;
height: 25px;
top: 1px;
left: 1px;
border-radius: 50%;
background: #4672fe;
z-index: 99;
transition: 300ms;
}
.night-light-label #night-light-checkbox:checked + .night-light-ball {
transform: translateX(28px);
}
.moon-svg,
.sun-svg {
width: 16px;
height: 16px;
position: absolute;
top: 50%;
transform: translateY(-50%);
}
.moon-svg {
right: 5px;
}
.sun-svg {
left: 5px;
}
.dark #moon-svg,
.dark #sun-svg {
fill: #e0e0e0 !important;
}
.dark {
background-color: #111;
color: #e0e0e0;
}
.dark .intro {
background: #111;
}
.dark .animation-list,
.dark .sidebar {
background: #15151d;
}
.dark .button.button-animations,
.dark .callout-hideList.button {
color: #e0e0e0;
border-color: rgba(255, 255, 255, 0.7);
outline: none;
}
.dark .copy-icon,
.dark .copy-icon:hover {
background: #15151d;
border-color: #e0e0e0;
}
.dark .copy-icon::before,
.dark .copy-icon:hover::before {
border-color: #e0e0e0;
}
.dark code {
color: #111;
}
.dark h2,
.dark h3,
.dark h4,
.dark a[title='Documentation'],
.dark pre * {
color: #e0e0e0;
}
.dark section {
border-color: rgba(255, 255, 255, 0.2);
}
.dark h1,
.dark a {
color: #4672fe;
}

View File

@ -1,66 +0,0 @@
const fs = require('fs');
const path = require('path');
/**
* Get and categorize all the animation names and compile
* to HTML lists
* @param {string} dir - directory containing the css file
* @param {string} file - css file name
*/
function compileAnimationlist(dir = '../source', file = 'animate.css') {
const filePath = path.join(__dirname, dir, file);
const content = fs.readFileSync(filePath, 'utf8');
const globalRegex = /\/(.*)\w/g;
const itemRegex = /(\/)(.*)(\.)/;
const rawList = content.match(globalRegex);
let currentGroup;
let list = {};
rawList.forEach((i) => {
const item = i.match(itemRegex);
if (item == null) {
const title = i.replace('/* ', '');
currentGroup = title;
list[title] = [];
return currentGroup;
}
return list[currentGroup].push(item[2]);
}, {});
const itemTemplate = (item) => `
<li class="animation-item" data-animation="${item}">
<span class="animation-item--title">${item}</span>
<button class="copy-icon" type="button">
<span class="tooltip">Copy class name to clipboard</span>
</button>
</li>`;
const listTemplate = (title, items) => {
const parsedTitle = title.toLowerCase().replace(' ', '_');
return `
<section class="${parsedTitle}" id="${parsedTitle}">
<h3 class="animation-title">${title}</h3>
<ul class="animation-group">${items.join('\n')}</ul>
</section>
`;
};
const compile = (list) => {
const titles = Object.keys(list);
return titles.map((title) => {
const items = list[title].map((item) => itemTemplate(item));
return listTemplate(title, items);
});
};
return compile(list).join('\n');
}
module.exports = compileAnimationlist;

View File

@ -1,52 +0,0 @@
const path = require('path');
const fs = require('fs');
const md = require('markdown-it')({
html: true,
linkify: true,
});
/**
* Converts string to slug. This is as simple as can be and doesn't handle much usecases on purpose.
* @param {string} text - string to be converted to slug
*/
function convertFileNameToId(text) {
return text.toLowerCase().match(/([a-z]+[-]*[a-z])\w+/)[0];
}
/**
* Gets all the markdown files on a folder, compile them to html and returns
* @param {string} dir - folder containing all the .md files
*/
function compileMD(dir = 'sections') {
const directory = path.join(__dirname, dir);
const files = fs.readdirSync(directory).sort();
const sectionTemplate = (file, content) => {
const message = 'Edit this on GitHub';
const fileName = convertFileNameToId(file);
const editURL = `https://github.com/animate-css/animate.css/blob/main/docsSource/sections/${file}`;
const parsedContent = md.render(content);
return `
<section class="docSection-${fileName}" id="${fileName}">
${parsedContent}
<p class="edit-github"><a href="${editURL}" title="${message}">${message}</a></p>
</section>
`;
};
const readMD = (file) => {
const filePath = path.join(__dirname, dir, file);
const content = fs.readFileSync(filePath, 'utf8');
return sectionTemplate(file, content);
};
const filesContent = files.map((section) => readMD(section));
return filesContent.join('\n');
}
module.exports = compileMD;

View File

@ -1,26 +0,0 @@
const path = require('path');
const fs = require('fs');
const {version} = JSON.parse(fs.readFileSync('package.json'));
const compileMD = require('./compileMD');
const compileAnimationList = require('./compileAnimationList');
const templatePath = path.join(__dirname, 'template.html');
const template = fs.readFileSync(templatePath, 'utf8');
const outputPath = '../docs';
const outputFile = 'index.html';
const docs = compileMD();
const list = compileAnimationList();
const output = path.join(__dirname, outputPath, outputFile);
const withDocs = template.replace('{{docs}}', docs);
const withListAndDocs = withDocs.replace('{{list}}', list);
const withVersion = withListAndDocs.replace('{{version}}', version);
fs.writeFile(output, withVersion, 'utf8', (err) => {
if (err) console.error(err);
console.log('Template compiled succesfully.');
});

View File

@ -1,3 +0,0 @@
> Animate.css v4 brought some **breaking changes**, please refer to the [migration guide](#migration) before updating from v3.x and under.
**Animate.css** is a library of ready-to-use, cross-browser animations for use in your web projects. Great for emphasis, home pages, sliders, and attention-guiding hints.

View File

@ -1,93 +0,0 @@
## Installation and Usage
### Installing
Install with npm:
```shell
$ npm install animate.css --save
```
Or install with Yarn (this will only work with appropriate tooling like Webpack, Parcel, etc. If you are not using any tool for packing or bundling your code, you can simply use the CDN method below):
```shell
$ yarn add animate.css
```
Import it into your file:
```js
import 'animate.css';
```
Or add it directly to your webpage using a CDN:
```html
<head>
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css"
/>
</head>
```
### Basic usage
After installing Animate.css, add the class `animate__animated` to an element, along with any of the [animation names](#attention_seekers) (don't forget the `animate__` prefix!):
```html
<h1 class="animate__animated animate__bounce">An animated element</h1>
```
That's it! You've got a CSS animated element. Super!
> Animations can improve the UX of an interface, but keep in mind that they can also get in the way of your users! Please read the [best practices](#best-practices) and [gotchas](#gotchas) sections to bring your web-things to life in the best way possible.
#### Using `@keyframes`
Even though the library provides you a few helper classes like the `animated` class to get you up running quickly, you can directly use the provided animations `keyframes`. This provides a flexible way to use Animate.css with your current projects without having to refactor your HTML code.
Example:
```css
.my-element {
display: inline-block;
margin: 0 0.5rem;
animation: bounce; /* referring directly to the animation's @keyframe declaration */
animation-duration: 2s; /* don't forget to set a duration! */
}
```
Be aware that some animations are dependent on the `animation-timing` property set on the animation's class. Changing or not declaring it might lead to unexpected results.
#### CSS Custom Properties (CSS Variables)
Since version 4, Animate.css uses custom properties (also known as CSS variables) to define the animation's duration, delay, and iterations. This makes Animate.css very flexible and customizable. Need to change an animation duration? Just set a new value globally or locally.
Example:
```css
/* This only changes this particular animation duration */
.animate__animated.animate__bounce {
--animate-duration: 2s;
}
/* This changes all the animations globally */
:root {
--animate-duration: 800ms;
--animate-delay: 0.9s;
}
```
Custom properties also make it easy to change all your animation's time-constrained properties on the fly. It means that you can have a slow-motion or time-lapse effect with a javascript one-liner:
```javascript
// All animations will take twice the time to accomplish
document.documentElement.style.setProperty('--animate-duration', '2s');
// All animations will take half the time to accomplish
document.documentElement.style.setProperty('--animate-duration', '.5s');
```
Even though some aging browsers do not support custom properties, Animate.css provides a proper fallback, widening its support for any browser that supports CSS animations.

View File

@ -1,93 +0,0 @@
## Utility Classes
Animate.css comes packed with a few utility classes to simplify its use.
### Delay classes
You can add delays directly on the element's class attribute, just like this:
```html
<div class="animate__animated animate__bounce animate__delay-2s">Example</div>
```
Animate.css provides the following delays:
| Class name | Default delay time |
| ------------------- | ------------------ |
| `animate__delay-2s` | `2s` |
| `animate__delay-3s` | `3s` |
| `animate__delay-4s` | `4s` |
| `animate__delay-5s` | `5s` |
The provided delays are from 1 to 5 seconds. You can customize them setting the `--animate-delay` property to a longer or a shorter duration:
```css
/* All delay classes will take 2x longer to start */
:root {
--animate-delay: 2s;
}
/* All delay classes will take half the time to start */
:root {
--animate-delay: 0.5s;
}
```
### Slow, slower, fast, and Faster classes
You can control the speed of the animation by adding these classes, as below:
```html
<div class="animate__animated animate__bounce animate__faster">Example</div>
```
| Class name | Default speed time |
| ----------------- | ------------------ |
| `animate__slow` | `2s` |
| `animate__slower` | `3s` |
| `animate__fast` | `800ms` |
| `animate__faster` | `500ms` |
The `animate__animated` class has a default speed of `1s`. You can also customize the animations duration through the `--animate-duration` property, globally or locally. This will affect both the animations and the utility classes. Example:
```css
/* All animations will take twice as long to finish */
:root {
--animate-duration: 2s;
}
/* Only this element will take half the time to finish */
.my-element {
--animate-duration: 0.5s;
}
```
Notice that some animations have a duration of less than 1 second. As we used the CSS `calc()` function, setting the duration through the `--animation-duration` property will respect these ratios. So, when you change the global duration, all the animations will respond to that change!
### Repeating classes
You can control the iteration count of the animation by adding these classes, like below:
```html
<div class="animate__animated animate__bounce animate__repeat-2">Example</div>
```
| Class Name | Default iteration count |
| ------------------- | ----------------------- |
| `animate__repeat-1` | `1` |
| `animate__repeat-2` | `2` |
| `animate__repeat-3` | `3` |
| `animate__infinite` | `infinite` |
As with the delay and speed classes, the `animate__repeat` class is based on the `--animate-repeat` property and has a default iteration count of `1`. You can customize them by setting the `--animate-repeat` property to a longer or a shorter value:
```css
/* The element will repeat the animation 2x
It's better to set this property locally and not globally or
you might end up with a messy situation */
.my-element {
--animate-repeat: 2;
}
```
Notice that `animate__infinite` doesn't use any custom property, and changes to `--animate-repeat` will have no effect. Don't forget to read the [best practices](#best-practices) section to make the best use of repeating animations.

View File

@ -1,60 +0,0 @@
## Best Practices
Animations can greatly improve an interface's UX, but it's important to follow some guidelines to not overdo it and deteriorate the user experience on your web-things. Following the following rules should provide a good start.
### Meaningful animations
You should avoid animating an element just for the sake of it. Keep in mind that animations should make an intention clear. Animations like attention seekers (bounce, flash, pulse, etc) should be used to bring the user's attention to something special in your interface and not only as a way to bring "flashiness" to it.
Entrances and exit animations should be used to orientate what is happening in the interface, clearly signaling that it's transitioning into a new state.
It doesn't mean that you should avoid adding playfulness to the interface, just be sure that the animations are not getting in the way of your user and that the page's performance is not affected by an exaggerated use of animations.
### Don't animate large elements
Avoid it as it won't bring much value to the user and will probably only cause confusion. Besides that, there is a good chance that the animations will be junky, culminating in bad UX.
### Don't animate root elements
Animating the `<html/>` or `<body/>` tags is possible, but you should avoid it. There were some reports pointing out that this could trigger some weird browser bugs. Besides, making the whole page bounce would hardly provide good value to your UX. If you indeed need this sort of effect, wrap your page in an element and animate it, like this:
```html
<body>
<main class="animate__animated animate__fadeInLeft">
<!-- Your code -->
</main>
</body>
```
### Infinite animations should be avoided
Even though Animate.css provides utility classes for repeating animations, including an infinite one, you should avoid endless animations. It will just distract your users and might annoy a good slice of them. So, use it wisely!
### Mind the initial and final state of your elements
All the Animate.css animations include a CSS property called `animation-fill-mode`, which controls the states of an element before and after animation. You can read more about it [here](https://developer.mozilla.org/en-US/docs/Web/CSS/animation-fill-mode). Animate.css defaults to `animation-fill-mode: both`, but you can change it to suit your needs.
### Don't disable the `prefers-reduced-motion` media query
Since version 3.7.0 Animate.css supports the `prefers-reduced-motion` media query which disables animations based on the OS system's preference on supporting browsers (most current browsers support it). This is a **critical accessibility feature** and should never be disabled! This is built into browsers to help people with vestibular and seizure disorders. You can read more about it [here](https://css-tricks.com/revisiting-prefers-reduced-motion-the-reduced-motion-media-query/). If your web-thing needs the animations to function, warn users, but don't disable the feature. You can do it easily with CSS only. Here's a simple example:
<p class="codepen" data-height="265" data-theme-id="dark" data-default-tab="css,result" data-user="eltonmesquita" data-slug-hash="oNjGGbw" style="height: 265px; box-sizing: border-box; display: flex; align-items: center; justify-content: center; border: 2px solid; margin: 1em 0; padding: 1em;" data-pen-title="Prefers-reduce-motion media query">
<span>See the Pen <a href="https://codepen.io/eltonmesquita/pen/oNjGGbw">
Prefers-reduce-motion media query</a> by Elton Mesquita (<a href="https://codepen.io/eltonmesquita">@eltonmesquita</a>)
on <a href="https://codepen.io">CodePen</a>.</span>
</p>
<script async src="https://static.codepen.io/assets/embed/ei.js"></script>
<h2 id="gotchas">Gotchas</h2>
### You can't animate inline elements
Even though some browsers can animate inline elements, this goes against the CSS animation specs and will break on some browsers or eventually cease to work. Always animate block or inline-block level elements (grid and flex containers and children are block-level elements too). You can set an element to `display: inline-block` when animating an inline-level element.
### Overflow
Most of the Animate.css animations will move elements across the screen and might create scrollbars on your web-thing. This is manageable using the `overflow: hidden` property. There's no recipe to when and where to use it, but the basic idea is to use it in the parent holding the animated element. It's up to you to figure out when and how to use it, [this guide](https://developer.mozilla.org/en-US/docs/Web/CSS/overflow) can help you understand it.
### Intervals between repeats
Unfortunately, this isn't possible with pure CSS right now. You have to use Javascript to achieve this result.

View File

@ -1,61 +0,0 @@
## 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 detect when an animation ends:
```javascript
const element = document.querySelector('.my-element');
element.classList.add('animate__animated', 'animate__bounceOutLeft');
element.addEventListener('animationend', () => {
// do something
});
```
or change its duration:
```javascript
const element = document.querySelector('.my-element');
element.style.setProperty('--animate-duration', '0.5s');
```
You can also use a simple function to add the animations classes and remove them automatically:
```javascript
const animateCSS = (element, animation, prefix = 'animate__') =>
// We create a Promise and return it
new Promise((resolve, reject) => {
const animationName = `${prefix}${animation}`;
const node = document.querySelector(element);
node.classList.add(`${prefix}animated`, animationName);
// When the animation ends, we clean the classes and resolve the Promise
function handleAnimationEnd(event) {
event.stopPropagation();
node.classList.remove(`${prefix}animated`, animationName);
resolve('Animation ended');
}
node.addEventListener('animationend', handleAnimationEnd, {once: true});
});
```
And use it like this:
```javascript
animateCSS('.my-element', 'bounce');
// or
animateCSS('.my-element', 'bounce').then((message) => {
// Do something after the animation
});
```
If you had a hard time understanding the previous function, have a look at [const](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/const), [classList](https://developer.mozilla.org/en-US/docs/Web/API/Element/classList), [arrow functions](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions), and [Promises](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise).

View File

@ -1,47 +0,0 @@
## Migration from v3.x and Under
Animate.css v4 brought some improvements, improved animations, and new animations, which makes it worth upgrading. However, it also comes with a breaking change: we have added a prefix for all of the Animate.css classes - defaulting to `animate__` - so a direct migration is impossible.
But fear not! Although the default build, `animate.min.css`, brings the `animate__` prefix we also provide the `animate.compat.css` file which brings no prefix at all, like the previous versions (3.x and under).
If you're using a bundler, update your import:
from:
```js
import 'animate.min.css';
```
to
```js
import 'animate.compat.css';
```
Notice that depending on your project's configuration, this might change a bit.
In case of using a CDN, update the link in your HTML:
from:
```html
<head>
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.7.2/animate.min.css"
/>
</head>
```
to
```html
<head>
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.0.0/animate.compat.css"
/>
</head>
```
In the case of a new project, it's highly recommended to use the default prefixed version as it'll make sure that you'll hardly have classes conflicting with your project. Besides, in later versions, we might decide to discontinue the `animate.compat.css` file.

View File

@ -1,56 +0,0 @@
## Custom Builds
<p class="warning">Custom builds are not possible from a node_modules folder as we don't ship the building tools in the npm module.</p>
Animate.css is powered by npm, postcss + postcss-preset-env, which means you can create custom builds pretty easily, using future CSS with proper fallbacks.
First of all, youll need Node and all other dependencies:
```shell
$ git clone https://github.com/animate-css/animate.css.git
$ cd animate.css
$ npm install
```
Next, run `npm start` to compile your custom build. Three files will be generated:
- `animate.css`: raw build, easy to read and without any optimization
- `animate.min.css`: minified build ready for production
- `animate.compat.css`: minified build ready for production **without class prefix**. This should only be used as an easy path for migrations.
For example, if you'll only use some of the “attention seekers” animations, simply edit the `./source/animate.css` file, delete every `@import`, and add the ones 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';
```
Now, just run `npm start` and your highly optimized build will be generated at the root of the project.
### Changing the default prefix
It's pretty straight forward to change animate's prefix on your custom build. Change the `animateConfig`'s `prefix` property in the `package.json` file and rebuild the library with `npm start`:
```json
/* on Animate.css package.json */
"animateConfig": {
"prefix": "myCustomPrefix__"
},
```
then:
```shell
$ npm start
```
Easy peasy!

View File

@ -1,3 +0,0 @@
## 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 major browsers and OS, including mobile), users can select "reduce motion" on their operating system preferences, and it will turn off CSS transitions for them without any further work required.

View File

@ -1,6 +0,0 @@
## 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 |

View File

@ -1,11 +0,0 @@
## License and Contributing
Animate.css is licensed under the [Hippocratic License](http://firstdonoharm.dev).
### Contributing
Pull requests are the way to go here. We only have two rules for submitting a pull request: match the naming convention (camelCase, categorized [fades, bounces, etc.]) and let us see a demo of submitted animations in a [pen](https://codepen.io). That **last one is important**.
### Code of Conduct
This project and everyone participating in it is governed by the [Contributor Covenant Code of Conduct](https://github.com/animate-css/animate.css/blob/main/CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code. Please report unacceptable behavior to [animate@eltonmesquita.com](mailto:animate@eltonmesquita.com).

View File

@ -1,177 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Primary Meta Tags -->
<title>Animate.css | A cross-browser library of CSS animations.</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="title" content="Animate.css | A cross-browser library of CSS animations.">
<meta name="description" content="Animate.css is a library of ready-to-use, cross-browser animations for you to use in your projects. Great for emphasis, home pages, sliders, and attention-guiding hints.">
<!-- Open Graph / Facebook -->
<meta property="og:type" content="website">
<meta property="og:url" content="https://animate.style">
<meta property="og:title" content="Animate.css | A cross-browser library of CSS animations.">
<meta property="og:description" content="Animate.css is a library of ready-to-use, cross-browser animations for you to use in your projects. Great for emphasis, home pages, sliders, and attention-guiding hints.">
<meta property="og:image" content="https://animate.style/img/animatecss-opengraph.jpg">
<!-- Twitter -->
<meta property="twitter:card" content="summary_large_image">
<meta property="twitter:url" content="https://animate.style">
<meta property="twitter:title" content="Animate.css | A cross-browser library of CSS animations.">
<meta property="twitter:description" content="Animate.css is a library of ready-to-use, cross-browser animations for you to use in your projects. Great for emphasis, home pages, sliders, and attention-guiding hints.">
<meta property="twitter:image" content="https://animate.style/img/animatecss-opengraph.jpg">
<!-- Favicon -->
<link rel="shortcut icon" href="img/favicon.ico" type="image/x-icon">
<link rel="icon" href="img/favicon.ico" type="image/x-icon">
<link rel="dns-prefetch" href="//fonts.googleapis.com" />
<link
href="https://fonts.googleapis.com/css2?family=Work+Sans:ital,wght@0,400;0,700;1,400&display=swap"
rel="stylesheet"
/>
<link
href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.20.0/themes/prism-tomorrow.min.css"
rel="stylesheet"
/>
<!-- Fork Corner Stylesheet -->
<link
href="https://cdn.jsdelivr.net/npm/fork-corner/dist/fork-corner.min.css"
rel="stylesheet"
/>
<link rel="stylesheet" href="animate.min.css" />
<link rel="stylesheet" href="style.css" />
</head>
<body>
<!-- Fork Corner -->
<a href="https://github.com/animate-css/animate.css" target="_blank" id="fork-corner" class="fork-corner fc-size-small fc-pos-tl fc-animate-grow fc-theme-github"></a>
<article class="intro">
<section class="callout">
<h1 class="callout-title">Animate.css</h1>
<h2 class="callout-subtitle">Just-add-water CSS animations</h2>
<p class="callout-showList">
<button class="button button-animations">See animations</button>
</p>
</section>
<section class="animation-list">
<label for="night-light-checkbox" class="night-light-label">
<input type="checkbox" id="night-light-checkbox" />
<span class="night-light-ball"></span>
<svg viewBox="0 0 512 512" class="sun-svg">
<path id="sun-svg"
d="M256 160c-52.9 0-96 43.1-96 96s43.1 96 96 96 96-43.1 96-96-43.1-96-96-96zm246.4 80.5l-94.7-47.3 33.5-100.4c4.5-13.6-8.4-26.5-21.9-21.9l-100.4 33.5-47.4-94.8c-6.4-12.8-24.6-12.8-31 0l-47.3 94.7L92.7 70.8c-13.6-4.5-26.5 8.4-21.9 21.9l33.5 100.4-94.7 47.4c-12.8 6.4-12.8 24.6 0 31l94.7 47.3-33.5 100.5c-4.5 13.6 8.4 26.5 21.9 21.9l100.4-33.5 47.3 94.7c6.4 12.8 24.6 12.8 31 0l47.3-94.7 100.4 33.5c13.6 4.5 26.5-8.4 21.9-21.9l-33.5-100.4 94.7-47.3c13-6.5 13-24.7.2-31.1zm-155.9 106c-49.9 49.9-131.1 49.9-181 0-49.9-49.9-49.9-131.1 0-181 49.9-49.9 131.1-49.9 181 0 49.9 49.9 49.9 131.1 0 181z">
</path>
</svg>
<svg viewBox="0 0 512 512" class="moon-svg">
<path id="moon-svg"
d="M283.211 512c78.962 0 151.079-35.925 198.857-94.792 7.068-8.708-.639-21.43-11.562-19.35-124.203 23.654-238.262-71.576-238.262-196.954 0-72.222 38.662-138.635 101.498-174.394 9.686-5.512 7.25-20.197-3.756-22.23A258.156 258.156 0 0 0 283.211 0c-141.309 0-256 114.511-256 256 0 141.309 114.511 256 256 256z">
</path>
</svg>
</label>
<button class="callout-hideList button">Close list</button>
{{list}}
</section>
<footer class="intro-footer">
<p>
Another thing from
<a href="https://daneden.me" target="_blank" title="Daniel Eden">Daniel Eden</a> and
<a href="#contributors" title="Contributors">friends</a>
</p>
</footer>
</article>
<main>
<header class="docs-header">
<div class="container">
<h2 class="docs-mainTitle">
<a href="#documentation" title="Documentation">Documentation</a>
</h2>
</div>
</header>
<article class="docs" id="documentation">
<span class="hamburger">
<svg
width="23"
height="15"
viewBox="0 0 23 15"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<line y1="1.5" x2="23" y2="1.5" stroke="#351C75" stroke-width="3" />
<line y1="7.5" x2="23" y2="7.5" stroke="#351C75" stroke-width="3" />
<line y1="13.5" x2="23" y2="13.5" stroke="#351C75" stroke-width="3" />
</svg>
</span>
<div class="container">
<div class="content">
{{docs}}
</div>
<aside class="sidebar">
<div class="meta">
<a href="https://github.com/animate-css/animate.css" target="_blank" class="icon-github">
<svg
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 18 18"
width="18"
height="18"
>
<path
fill="#000000"
d="M16.793 4.703a8.96 8.96 0 00-3.276-3.276A8.803 8.803 0 009 .22a8.804 8.804 0 00-4.518 1.207 8.96 8.96 0 00-3.275 3.276A8.803 8.803 0 000 9.22c0 1.96.572 3.724 1.717 5.29 1.144 1.567 2.623 2.651 4.435 3.252.211.04.367.012.469-.081a.458.458 0 00.152-.352l-.006-.633c-.004-.398-.006-.746-.006-1.042l-.27.046a3.434 3.434 0 01-.65.041 4.958 4.958 0 01-.814-.082 1.82 1.82 0 01-.785-.351 1.487 1.487 0 01-.516-.72l-.117-.27a2.93 2.93 0 00-.369-.598c-.168-.219-.338-.367-.51-.445l-.082-.059a.865.865 0 01-.152-.14.643.643 0 01-.105-.165c-.024-.054-.004-.1.058-.135.063-.035.176-.052.34-.052l.234.035c.157.031.35.125.58.281.23.156.42.36.569.61.18.32.396.564.65.732.254.168.51.252.768.252.257 0 .48-.02.667-.059a2.33 2.33 0 00.528-.175c.07-.524.262-.927.574-1.208a8.026 8.026 0 01-1.201-.21 4.779 4.779 0 01-1.102-.458 3.153 3.153 0 01-.943-.785c-.25-.312-.455-.723-.615-1.23-.16-.508-.24-1.094-.24-1.758 0-.946.308-1.75.925-2.414-.289-.711-.261-1.508.082-2.39.227-.071.563-.018 1.008.157.446.176.772.327.979.452.207.125.373.23.498.316A8.32 8.32 0 019 4.568c.773 0 1.523.101 2.25.304l.445-.281c.305-.188.664-.36 1.078-.516.414-.156.73-.199.95-.129.351.883.382 1.68.093 2.39.617.665.926 1.47.926 2.415 0 .664-.08 1.252-.24 1.764-.16.511-.367.921-.62 1.23-.255.309-.572.569-.95.78-.38.21-.747.362-1.102.456a8.013 8.013 0 01-1.201.212c.406.351.61.906.61 1.664v2.472c0 .14.048.258.146.351.097.094.252.121.463.082 1.812-.601 3.29-1.685 4.435-3.252C17.427 12.944 18 11.18 18 9.22a8.81 8.81 0 00-1.207-4.517z"
/>
</svg>
</a>
<span class="animate-version">v{{version}}</span>
</div>
</aside>
</div>
</article>
</main>
<footer class="main-footer">
<p>
Animate.css is a Hippocratic-2.1 licensed library.
You can use it freely, respecting the terms included in the <a href="https://github.com/animate-css/animate.css/blob/main/LICENSE" title="license">license file.</a>
</p>
</footer>
<aside class="motionless__banner">
<p class="motionless__paragraph">
<b>Hey!</b> It seems that you have animations disabled on your OS, turning Animate.css
off.<br />
Animate.css supports the
<a
title="prefers-reduced-motion CSS media feature on MDN"
target="_blank"
rel="noopener noreferrer"
href="https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-reduced-motion"
>
prefers-reduced-motion CSS media feature</a
>. You can read more about it
<a
title="Move Ya! Or maybe, don't, if the user prefers-reduced-motion! on Google Developers"
target="_blank"
rel="noopener noreferrer"
href="https://developers.google.com/web/updates/2019/03/prefers-reduced-motion"
>
here</a
>.
</p>
</aside>
<script type="module" src="main.mjs"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.20.0/prism.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.20.0/plugins/autoloader/prism-autoloader.min.js"></script>
<!-- Fork Corner Scripts -->
<script src="https://cdn.jsdelivr.net/npm/fork-corner/dist/fork-corner.min.js" defer></script>
</body>
</html>

105
gulpfile.js Normal file
View File

@ -0,0 +1,105 @@
// Utilities
var autoprefixer = require('autoprefixer');
var cssnano = require('cssnano');
var fs = require('fs');
// Gulp
var gulp = require('gulp');
// Gulp plugins
var concat = require('gulp-concat');
var gutil = require('gulp-util');
var header = require('gulp-header');
var postcss = require('gulp-postcss');
var rename = require('gulp-rename');
var runSequence = require('run-sequence');
// Misc/global vars
var pkg = JSON.parse(fs.readFileSync('package.json'));
var activatedAnimations = activateAnimations();
// Task options
var opts = {
destPath: './',
concatName: 'animate.css',
autoprefixer: {
browsers: ['last 2 versions'],
cascade: false
},
minRename: {
suffix: '.min'
},
banner: [
'@charset "UTF-8";\n',
'/*!',
' * <%= name %> -<%= homepage %>',
' * Version - <%= version %>',
' * Licensed under the MIT license - http://opensource.org/licenses/MIT',
' *',
' * Copyright (c) <%= new Date().getFullYear() %> <%= author.name %>',
' */\n\n'
].join('\n')
};
// ----------------------------
// Gulp task definitions
// ----------------------------
gulp.task('default', function() {
runSequence('createCSS', 'addHeader');
});
gulp.task('createCSS', function() {
return gulp.src(activatedAnimations)
.pipe(concat(opts.concatName))
.pipe(postcss([
autoprefixer(opts.autoprefixer)
]))
.pipe(gulp.dest(opts.destPath))
.pipe(postcss([
autoprefixer(opts.autoprefixer),
cssnano({reduceIdents: {keyframes: false}})
]))
.pipe(rename(opts.minRename))
.pipe(gulp.dest(opts.destPath));
});
gulp.task('addHeader', function() {
return gulp.src('*.css')
.pipe(header(opts.banner, pkg))
.pipe(gulp.dest(opts.destPath));
});
// ----------------------------
// Helpers/functions
// ----------------------------
// 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' ],
count = 0;
for (category in categories) {
if (categories.hasOwnProperty(category)) {
files = categories[category];
for (var i = 0; i < files.length; ++i) {
target.push('source/' + category + '/' + files[i] + '.css');
count += 1;
}
}
}
if (!count) {
gutil.log('No animations activated.');
} else {
gutil.log(count + (count > 1 ? ' animations' : ' animation') + ' activated.');
}
return target;
}

View File

@ -1,38 +1,16 @@
{
"name": "animate.css",
"version": "4.1.1",
"description": "A cross-browser library of CSS animations",
"version": "3.5.1",
"main": "animate.css",
"repository": {
"type": "git",
"url": "https://github.com/animate-css/animate.css.git"
"url": "https://github.com/daneden/animate.css.git"
},
"author": {
"name": "Animate.css"
"name": "Daniel Eden"
},
"homepage": "https://animate.style/",
"license": "Hippocratic-2.1",
"animateConfig": {
"prefix": "animate__"
},
"scripts": {
"start": "npm-run-all raw prod compat",
"compat": "npx postcss source/animate.css -o animate.compat.css --no-map --env compat",
"dev": "npx postcss source/animate.css -o animate.css --no-map --env development -w",
"raw": "npx postcss source/animate.css -o animate.css --no-map --env development",
"prod": "npx postcss source/animate.css -o animate.min.css --no-map --env production",
"format": "prettier --write \"**/*.{js,json,md,css}\"",
"docs:library": "npx postcss source/animate.css -o ./docs/animate.min.css --no-map --env production",
"docs:pages": "node ./docsSource/index.js",
"docs": "npm-run-all docs:library docs:pages",
"version": "npm-run-all start docs && git add -A docs animate.css animate.min.css animate.compat.css",
"postversion": "git push && git push --tags",
"prepare": "husky install"
},
"browserslist": [
"> 3%",
"last 2 versions"
],
"homepage": "http://daneden.me/animate",
"license": "MIT",
"style": "./animate.css",
"jspm": {
"main": "animate.css!",
@ -42,28 +20,17 @@
}
},
"devDependencies": {
"autoprefixer": "^10.4.7",
"cssnano": "^5.0.17",
"eslint": "^7.32.0",
"husky": "^7.0.4",
"lint-staged": "^11.2.6",
"markdown-it": "^12.3.2",
"npm-run-all": "^4.1.5",
"postcss": "^8.4.14",
"postcss-cli": "^8.3.1",
"postcss-header": "^3.0.1",
"postcss-import": "^14.0.2",
"postcss-prefixer": "^2.1.3",
"postcss-preset-env": "^6.7.0",
"prettier": "^2.7.1"
"autoprefixer": "^6.3.2",
"cssnano": "^3.5.1",
"gulp": "^3.9.0",
"gulp-concat": "^2.6.0",
"gulp-header": "^1.7.1",
"gulp-postcss": "^6.1.0",
"gulp-rename": "^1.2.2",
"gulp-util": "^3.0.7",
"run-sequence": "^1.1.5"
},
"lint-staged": {
"*.{mjs,js,json,md,css}": "prettier --write"
},
"files": [
"animate.compat.css",
"animate.min.css",
"animate.css",
"source/**/*.css"
]
"spm": {
"main": "./animate.css"
}
}

View File

@ -1,46 +0,0 @@
const fs = require('fs');
const {homepage, version, author, animateConfig} = JSON.parse(fs.readFileSync('package.json'));
const header = `
@charset "UTF-8";
/*!
* animate.css - ${homepage}
* Version - ${version}
* Licensed under the Hippocratic License 2.1 - http://firstdonoharm.dev
*
* Copyright (c) ${new Date().getFullYear()} ${author.name}
*/
`;
module.exports = (ctx) => {
const prefix = ctx.env === 'compat' ? '' : animateConfig.prefix;
const devMessage = `🎉🎉🎉🎉 \nanimate.css ${ctx.env} build was compiled sucessfully! \n`;
console.log(devMessage);
return {
map: ctx.options.map,
parser: ctx.options.parser,
plugins: {
'postcss-import': {root: ctx.file.dirname},
'postcss-prefixer': {
prefix,
ignore: [/\[class\*=.*\]/],
},
'postcss-preset-env': {
autoprefixer: {
cascade: false,
},
features: {
'custom-properties': true,
},
},
cssnano: ctx.env === 'production' || ctx.env === 'compat' ? {} : false,
'postcss-header': {
header,
},
},
};
};

View File

@ -1,5 +1,5 @@
.animated {
animation-duration: var(--animate-duration);
animation-duration: 1s;
animation-fill-mode: both;
}
@ -7,62 +7,13 @@
animation-iteration-count: infinite;
}
.animated.repeat-1 {
animation-iteration-count: var(--animate-repeat);
.animated.hinge {
animation-duration: 2s;
}
.animated.repeat-2 {
animation-iteration-count: calc(var(--animate-repeat) * 2);
}
.animated.repeat-3 {
animation-iteration-count: calc(var(--animate-repeat) * 3);
}
.animated.delay-1s {
animation-delay: var(--animate-delay);
}
.animated.delay-2s {
animation-delay: calc(var(--animate-delay) * 2);
}
.animated.delay-3s {
animation-delay: calc(var(--animate-delay) * 3);
}
.animated.delay-4s {
animation-delay: calc(var(--animate-delay) * 4);
}
.animated.delay-5s {
animation-delay: calc(var(--animate-delay) * 5);
}
.animated.faster {
animation-duration: calc(var(--animate-duration) / 2);
}
.animated.fast {
animation-duration: calc(var(--animate-duration) * 0.8);
}
.animated.slow {
animation-duration: calc(var(--animate-duration) * 2);
}
.animated.slower {
animation-duration: calc(var(--animate-duration) * 3);
}
@media print, (prefers-reduced-motion: reduce) {
.animated {
animation-duration: 1ms !important;
transition-duration: 1ms !important;
animation-iteration-count: 1 !important;
}
.animated[class*='Out'] {
opacity: 0;
}
.animated.flipOutX,
.animated.flipOutY,
.animated.bounceIn,
.animated.bounceOut {
animation-duration: .75s;
}

View File

@ -1,5 +0,0 @@
:root {
--animate-duration: 1s;
--animate-delay: 1s;
--animate-repeat: 1;
}

131
source/animate.css vendored
View File

@ -1,131 +0,0 @@
@import '_vars.css';
@import '_base.css';
/* Attention seekers */
@import 'attention_seekers/bounce.css';
@import 'attention_seekers/flash.css';
@import 'attention_seekers/pulse.css';
@import 'attention_seekers/rubberBand.css';
@import 'attention_seekers/shakeX.css';
@import 'attention_seekers/shakeY.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';
/* Back entrances */
@import 'back_entrances/backInDown.css';
@import 'back_entrances/backInLeft.css';
@import 'back_entrances/backInRight.css';
@import 'back_entrances/backInUp.css';
/* Back exits */
@import 'back_exits/backOutDown.css';
@import 'back_exits/backOutLeft.css';
@import 'back_exits/backOutRight.css';
@import 'back_exits/backOutUp.css';
/* Bouncing entrances */
@import 'bouncing_entrances/bounceIn.css';
@import 'bouncing_entrances/bounceInDown.css';
@import 'bouncing_entrances/bounceInLeft.css';
@import 'bouncing_entrances/bounceInRight.css';
@import 'bouncing_entrances/bounceInUp.css';
/* Bouncing exits */
@import 'bouncing_exits/bounceOut.css';
@import 'bouncing_exits/bounceOutDown.css';
@import 'bouncing_exits/bounceOutLeft.css';
@import 'bouncing_exits/bounceOutRight.css';
@import 'bouncing_exits/bounceOutUp.css';
/* Fading entrances */
@import 'fading_entrances/fadeIn.css';
@import 'fading_entrances/fadeInDown.css';
@import 'fading_entrances/fadeInDownBig.css';
@import 'fading_entrances/fadeInLeft.css';
@import 'fading_entrances/fadeInLeftBig.css';
@import 'fading_entrances/fadeInRight.css';
@import 'fading_entrances/fadeInRightBig.css';
@import 'fading_entrances/fadeInUp.css';
@import 'fading_entrances/fadeInUpBig.css';
@import 'fading_entrances/fadeInTopLeft.css';
@import 'fading_entrances/fadeInTopRight.css';
@import 'fading_entrances/fadeInBottomLeft.css';
@import 'fading_entrances/fadeInBottomRight.css';
/* Fading exits */
@import 'fading_exits/fadeOut.css';
@import 'fading_exits/fadeOutDown.css';
@import 'fading_exits/fadeOutDownBig.css';
@import 'fading_exits/fadeOutLeft.css';
@import 'fading_exits/fadeOutLeftBig.css';
@import 'fading_exits/fadeOutRight.css';
@import 'fading_exits/fadeOutRightBig.css';
@import 'fading_exits/fadeOutUp.css';
@import 'fading_exits/fadeOutUpBig.css';
@import 'fading_exits/fadeOutTopLeft.css';
@import 'fading_exits/fadeOutTopRight.css';
@import 'fading_exits/fadeOutBottomRight.css';
@import 'fading_exits/fadeOutBottomLeft.css';
/* Flippers */
@import 'flippers/flip.css';
@import 'flippers/flipInX.css';
@import 'flippers/flipInY.css';
@import 'flippers/flipOutX.css';
@import 'flippers/flipOutY.css';
/* Lightspeed */
@import 'lightspeed/lightSpeedInRight.css';
@import 'lightspeed/lightSpeedInLeft.css';
@import 'lightspeed/lightSpeedOutRight.css';
@import 'lightspeed/lightSpeedOutLeft.css';
/* Rotating entrances */
@import 'rotating_entrances/rotateIn.css';
@import 'rotating_entrances/rotateInDownLeft.css';
@import 'rotating_entrances/rotateInDownRight.css';
@import 'rotating_entrances/rotateInUpLeft.css';
@import 'rotating_entrances/rotateInUpRight.css';
/* Rotating exits */
@import 'rotating_exits/rotateOut.css';
@import 'rotating_exits/rotateOutDownLeft.css';
@import 'rotating_exits/rotateOutDownRight.css';
@import 'rotating_exits/rotateOutUpLeft.css';
@import 'rotating_exits/rotateOutUpRight.css';
/* Specials */
@import 'specials/hinge.css';
@import 'specials/jackInTheBox.css';
@import 'specials/rollIn.css';
@import 'specials/rollOut.css';
/* Zooming entrances */
@import 'zooming_entrances/zoomIn.css';
@import 'zooming_entrances/zoomInDown.css';
@import 'zooming_entrances/zoomInLeft.css';
@import 'zooming_entrances/zoomInRight.css';
@import 'zooming_entrances/zoomInUp.css';
/* Zooming exits */
@import 'zooming_exits/zoomOut.css';
@import 'zooming_exits/zoomOutDown.css';
@import 'zooming_exits/zoomOutLeft.css';
@import 'zooming_exits/zoomOutRight.css';
@import 'zooming_exits/zoomOutUp.css';
/* Sliding entrances */
@import 'sliding_entrances/slideInDown.css';
@import 'sliding_entrances/slideInLeft.css';
@import 'sliding_entrances/slideInRight.css';
@import 'sliding_entrances/slideInUp.css';
/* Sliding exits */
@import 'sliding_exits/slideOutDown.css';
@import 'sliding_exits/slideOutLeft.css';
@import 'sliding_exits/slideOutRight.css';
@import 'sliding_exits/slideOutUp.css';

View File

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

View File

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

View File

@ -1,27 +0,0 @@
@keyframes heartBeat {
0% {
transform: scale(1);
}
14% {
transform: scale(1.3);
}
28% {
transform: scale(1);
}
42% {
transform: scale(1.3);
}
70% {
transform: scale(1);
}
}
.heartBeat {
animation-name: heartBeat;
animation-duration: calc(var(--animate-duration) * 1.3);
animation-timing-function: ease-in-out;
}

View File

@ -1,8 +1,6 @@
@keyframes jello {
from,
11.1%,
to {
transform: translate3d(0, 0, 0);
from, 11.1%, to {
transform: none;
}
22.2% {

View File

@ -16,5 +16,4 @@
.pulse {
animation-name: pulse;
animation-timing-function: ease-in-out;
}

View File

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

View File

@ -1,21 +1,13 @@
@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

@ -1,25 +0,0 @@
@keyframes shakeX {
from,
to {
transform: translate3d(0, 0, 0);
}
10%,
30%,
50%,
70%,
90% {
transform: translate3d(-10px, 0, 0);
}
20%,
40%,
60%,
80% {
transform: translate3d(10px, 0, 0);
}
}
.shakeX {
animation-name: shakeX;
}

View File

@ -1,25 +0,0 @@
@keyframes shakeY {
from,
to {
transform: translate3d(0, 0, 0);
}
10%,
30%,
50%,
70%,
90% {
transform: translate3d(0, -10px, 0);
}
20%,
40%,
60%,
80% {
transform: translate3d(0, 10px, 0);
}
}
.shakeY {
animation-name: shakeY;
}

View File

@ -3,21 +3,15 @@
transform: scale3d(1, 1, 1);
}
10%,
20% {
transform: scale3d(0.9, 0.9, 0.9) rotate3d(0, 0, 1, -3deg);
10%, 20% {
transform: scale3d(.9, .9, .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

@ -2,7 +2,7 @@
@keyframes wobble {
from {
transform: translate3d(0, 0, 0);
transform: none;
}
15% {
@ -26,7 +26,7 @@
}
to {
transform: translate3d(0, 0, 0);
transform: none;
}
}

View File

@ -1,20 +0,0 @@
@keyframes backInDown {
0% {
transform: translateY(-1200px) scale(0.7);
opacity: 0.7;
}
80% {
transform: translateY(0px) scale(0.7);
opacity: 0.7;
}
100% {
transform: scale(1);
opacity: 1;
}
}
.backInDown {
animation-name: backInDown;
}

View File

@ -1,20 +0,0 @@
@keyframes backInLeft {
0% {
transform: translateX(-2000px) scale(0.7);
opacity: 0.7;
}
80% {
transform: translateX(0px) scale(0.7);
opacity: 0.7;
}
100% {
transform: scale(1);
opacity: 1;
}
}
.backInLeft {
animation-name: backInLeft;
}

View File

@ -1,20 +0,0 @@
@keyframes backInRight {
0% {
transform: translateX(2000px) scale(0.7);
opacity: 0.7;
}
80% {
transform: translateX(0px) scale(0.7);
opacity: 0.7;
}
100% {
transform: scale(1);
opacity: 1;
}
}
.backInRight {
animation-name: backInRight;
}

View File

@ -1,20 +0,0 @@
@keyframes backInUp {
0% {
transform: translateY(1200px) scale(0.7);
opacity: 0.7;
}
80% {
transform: translateY(0px) scale(0.7);
opacity: 0.7;
}
100% {
transform: scale(1);
opacity: 1;
}
}
.backInUp {
animation-name: backInUp;
}

View File

@ -1,20 +0,0 @@
@keyframes backOutDown {
0% {
transform: scale(1);
opacity: 1;
}
20% {
transform: translateY(0px) scale(0.7);
opacity: 0.7;
}
100% {
transform: translateY(700px) scale(0.7);
opacity: 0.7;
}
}
.backOutDown {
animation-name: backOutDown;
}

View File

@ -1,20 +0,0 @@
@keyframes backOutLeft {
0% {
transform: scale(1);
opacity: 1;
}
20% {
transform: translateX(0px) scale(0.7);
opacity: 0.7;
}
100% {
transform: translateX(-2000px) scale(0.7);
opacity: 0.7;
}
}
.backOutLeft {
animation-name: backOutLeft;
}

View File

@ -1,20 +0,0 @@
@keyframes backOutRight {
0% {
transform: scale(1);
opacity: 1;
}
20% {
transform: translateX(0px) scale(0.7);
opacity: 0.7;
}
100% {
transform: translateX(2000px) scale(0.7);
opacity: 0.7;
}
}
.backOutRight {
animation-name: backOutRight;
}

View File

@ -1,20 +0,0 @@
@keyframes backOutUp {
0% {
transform: scale(1);
opacity: 1;
}
20% {
transform: translateY(0px) scale(0.7);
opacity: 0.7;
}
100% {
transform: translateY(-700px) scale(0.7);
opacity: 0.7;
}
}
.backOutUp {
animation-name: backOutUp;
}

View File

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

View File

@ -1,32 +1,28 @@
@keyframes bounceInDown {
from,
60%,
75%,
90%,
to {
animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
from, 60%, 75%, 90%, to {
animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
}
0% {
opacity: 0;
transform: translate3d(0, -3000px, 0) scaleY(3);
transform: translate3d(0, -3000px, 0);
}
60% {
opacity: 1;
transform: translate3d(0, 25px, 0) scaleY(0.9);
transform: translate3d(0, 25px, 0);
}
75% {
transform: translate3d(0, -10px, 0) scaleY(0.95);
transform: translate3d(0, -10px, 0);
}
90% {
transform: translate3d(0, 5px, 0) scaleY(0.985);
transform: translate3d(0, 5px, 0);
}
to {
transform: translate3d(0, 0, 0);
transform: none;
}
}

View File

@ -1,32 +1,28 @@
@keyframes bounceInLeft {
from,
60%,
75%,
90%,
to {
animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
from, 60%, 75%, 90%, to {
animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
}
0% {
opacity: 0;
transform: translate3d(-3000px, 0, 0) scaleX(3);
transform: translate3d(-3000px, 0, 0);
}
60% {
opacity: 1;
transform: translate3d(25px, 0, 0) scaleX(1);
transform: translate3d(25px, 0, 0);
}
75% {
transform: translate3d(-10px, 0, 0) scaleX(0.98);
transform: translate3d(-10px, 0, 0);
}
90% {
transform: translate3d(5px, 0, 0) scaleX(0.995);
transform: translate3d(5px, 0, 0);
}
to {
transform: translate3d(0, 0, 0);
transform: none;
}
}

View File

@ -1,32 +1,28 @@
@keyframes bounceInRight {
from,
60%,
75%,
90%,
to {
animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
from, 60%, 75%, 90%, to {
animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
}
from {
opacity: 0;
transform: translate3d(3000px, 0, 0) scaleX(3);
transform: translate3d(3000px, 0, 0);
}
60% {
opacity: 1;
transform: translate3d(-25px, 0, 0) scaleX(1);
transform: translate3d(-25px, 0, 0);
}
75% {
transform: translate3d(10px, 0, 0) scaleX(0.98);
transform: translate3d(10px, 0, 0);
}
90% {
transform: translate3d(-5px, 0, 0) scaleX(0.995);
transform: translate3d(-5px, 0, 0);
}
to {
transform: translate3d(0, 0, 0);
transform: none;
}
}

View File

@ -1,28 +1,24 @@
@keyframes bounceInUp {
from,
60%,
75%,
90%,
to {
animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
from, 60%, 75%, 90%, to {
animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
}
from {
opacity: 0;
transform: translate3d(0, 3000px, 0) scaleY(5);
transform: translate3d(0, 3000px, 0);
}
60% {
opacity: 1;
transform: translate3d(0, -20px, 0) scaleY(0.9);
transform: translate3d(0, -20px, 0);
}
75% {
transform: translate3d(0, 10px, 0) scaleY(0.95);
transform: translate3d(0, 10px, 0);
}
90% {
transform: translate3d(0, -5px, 0) scaleY(0.985);
transform: translate3d(0, -5px, 0);
}
to {

View File

@ -1,21 +1,19 @@
@keyframes bounceOut {
20% {
transform: scale3d(0.9, 0.9, 0.9);
transform: scale3d(.9, .9, .9);
}
50%,
55% {
50%, 55% {
opacity: 1;
transform: scale3d(1.1, 1.1, 1.1);
}
to {
opacity: 0;
transform: scale3d(0.3, 0.3, 0.3);
transform: scale3d(.3, .3, .3);
}
}
.bounceOut {
animation-duration: calc(var(--animate-duration) * 0.75);
animation-name: bounceOut;
}

View File

@ -1,17 +1,16 @@
@keyframes bounceOutDown {
20% {
transform: translate3d(0, 10px, 0) scaleY(0.985);
transform: translate3d(0, 10px, 0);
}
40%,
45% {
40%, 45% {
opacity: 1;
transform: translate3d(0, -20px, 0) scaleY(0.9);
transform: translate3d(0, -20px, 0);
}
to {
opacity: 0;
transform: translate3d(0, 2000px, 0) scaleY(3);
transform: translate3d(0, 2000px, 0);
}
}

View File

@ -1,12 +1,12 @@
@keyframes bounceOutLeft {
20% {
opacity: 1;
transform: translate3d(20px, 0, 0) scaleX(0.9);
transform: translate3d(20px, 0, 0);
}
to {
opacity: 0;
transform: translate3d(-2000px, 0, 0) scaleX(2);
transform: translate3d(-2000px, 0, 0);
}
}

View File

@ -1,12 +1,12 @@
@keyframes bounceOutRight {
20% {
opacity: 1;
transform: translate3d(-20px, 0, 0) scaleX(0.9);
transform: translate3d(-20px, 0, 0);
}
to {
opacity: 0;
transform: translate3d(2000px, 0, 0) scaleX(2);
transform: translate3d(2000px, 0, 0);
}
}

View File

@ -1,17 +1,16 @@
@keyframes bounceOutUp {
20% {
transform: translate3d(0, -10px, 0) scaleY(0.985);
transform: translate3d(0, -10px, 0);
}
40%,
45% {
40%, 45% {
opacity: 1;
transform: translate3d(0, 20px, 0) scaleY(0.9);
transform: translate3d(0, 20px, 0);
}
to {
opacity: 0;
transform: translate3d(0, -2000px, 0) scaleY(3);
transform: translate3d(0, -2000px, 0);
}
}

View File

@ -1,14 +0,0 @@
@keyframes fadeInBottomLeft {
from {
opacity: 0;
transform: translate3d(-100%, 100%, 0);
}
to {
opacity: 1;
transform: translate3d(0, 0, 0);
}
}
.fadeInBottomLeft {
animation-name: fadeInBottomLeft;
}

View File

@ -1,14 +0,0 @@
@keyframes fadeInBottomRight {
from {
opacity: 0;
transform: translate3d(100%, 100%, 0);
}
to {
opacity: 1;
transform: translate3d(0, 0, 0);
}
}
.fadeInBottomRight {
animation-name: fadeInBottomRight;
}

View File

@ -6,7 +6,7 @@
to {
opacity: 1;
transform: translate3d(0, 0, 0);
transform: none;
}
}

View File

@ -6,7 +6,7 @@
to {
opacity: 1;
transform: translate3d(0, 0, 0);
transform: none;
}
}

View File

@ -6,7 +6,7 @@
to {
opacity: 1;
transform: translate3d(0, 0, 0);
transform: none;
}
}

View File

@ -6,7 +6,7 @@
to {
opacity: 1;
transform: translate3d(0, 0, 0);
transform: none;
}
}

View File

@ -6,7 +6,7 @@
to {
opacity: 1;
transform: translate3d(0, 0, 0);
transform: none;
}
}

View File

@ -6,7 +6,7 @@
to {
opacity: 1;
transform: translate3d(0, 0, 0);
transform: none;
}
}

View File

@ -1,14 +0,0 @@
@keyframes fadeInTopLeft {
from {
opacity: 0;
transform: translate3d(-100%, -100%, 0);
}
to {
opacity: 1;
transform: translate3d(0, 0, 0);
}
}
.fadeInTopLeft {
animation-name: fadeInTopLeft;
}

View File

@ -1,14 +0,0 @@
@keyframes fadeInTopRight {
from {
opacity: 0;
transform: translate3d(100%, -100%, 0);
}
to {
opacity: 1;
transform: translate3d(0, 0, 0);
}
}
.fadeInTopRight {
animation-name: fadeInTopRight;
}

View File

@ -6,7 +6,7 @@
to {
opacity: 1;
transform: translate3d(0, 0, 0);
transform: none;
}
}

View File

@ -6,7 +6,7 @@
to {
opacity: 1;
transform: translate3d(0, 0, 0);
transform: none;
}
}

View File

@ -1,14 +0,0 @@
@keyframes fadeOutBottomLeft {
from {
opacity: 1;
transform: translate3d(0, 0, 0);
}
to {
opacity: 0;
transform: translate3d(-100%, 100%, 0);
}
}
.fadeOutBottomLeft {
animation-name: fadeOutBottomLeft;
}

View File

@ -1,14 +0,0 @@
@keyframes fadeOutBottomRight {
from {
opacity: 1;
transform: translate3d(0, 0, 0);
}
to {
opacity: 0;
transform: translate3d(100%, 100%, 0);
}
}
.fadeOutBottomRight {
animation-name: fadeOutBottomRight;
}

View File

@ -1,14 +0,0 @@
@keyframes fadeOutTopLeft {
from {
opacity: 1;
transform: translate3d(0, 0, 0);
}
to {
opacity: 0;
transform: translate3d(-100%, -100%, 0);
}
}
.fadeOutTopLeft {
animation-name: fadeOutTopLeft;
}

View File

@ -1,14 +0,0 @@
@keyframes fadeOutTopRight {
from {
opacity: 1;
transform: translate3d(0, 0, 0);
}
to {
opacity: 0;
transform: translate3d(100%, -100%, 0);
}
}
.fadeOutTopRight {
animation-name: fadeOutTopRight;
}

View File

@ -1,29 +1,26 @@
@keyframes flip {
from {
transform: perspective(400px) scale3d(1, 1, 1) translate3d(0, 0, 0) rotate3d(0, 1, 0, -360deg);
transform: perspective(400px) rotate3d(0, 1, 0, -360deg);
animation-timing-function: ease-out;
}
40% {
transform: perspective(400px) scale3d(1, 1, 1) translate3d(0, 0, 150px)
rotate3d(0, 1, 0, -190deg);
transform: perspective(400px) translate3d(0, 0, 150px) rotate3d(0, 1, 0, -190deg);
animation-timing-function: ease-out;
}
50% {
transform: perspective(400px) scale3d(1, 1, 1) translate3d(0, 0, 150px)
rotate3d(0, 1, 0, -170deg);
transform: perspective(400px) translate3d(0, 0, 150px) rotate3d(0, 1, 0, -170deg);
animation-timing-function: ease-in;
}
80% {
transform: perspective(400px) scale3d(0.95, 0.95, 0.95) translate3d(0, 0, 0)
rotate3d(0, 1, 0, 0deg);
transform: perspective(400px) scale3d(.95, .95, .95);
animation-timing-function: ease-in;
}
to {
transform: perspective(400px) scale3d(1, 1, 1) translate3d(0, 0, 0) rotate3d(0, 1, 0, 0deg);
transform: perspective(400px);
animation-timing-function: ease-in;
}
}

Some files were not shown because too many files have changed in this diff Show More