From 436736990d97f6220fe9e636da1760c7d4e6ff26 Mon Sep 17 00:00:00 2001 From: Elton Mesquita Date: Mon, 13 Jul 2020 09:43:19 +0100 Subject: [PATCH] Adds animate__infinite to docs. Fixes #1081 (#1082) * Adds animate__infite to docs. Fixes #1081 * Updates github edit link * Adds missing 'by' --- docs/index.html | 29 +++++++++++++++++------------ docsSource/compileMD.js | 2 +- docsSource/sections/02-utilities.md | 7 +++++-- 3 files changed, 23 insertions(+), 15 deletions(-) diff --git a/docs/index.html b/docs/index.html index 34a26c0..0c41322 100644 --- a/docs/index.html +++ b/docs/index.html @@ -836,7 +836,7 @@

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.

-

Edit this on Github

+

Edit this on GitHub

@@ -900,7 +900,7 @@ document.documentElement.style.setProperty('--animate-duration', '.5s');

Even though custom properties are not supported by some aging browsers, Animate.css provides a proper fallback, widening its support for any browser that supports CSS animations.

-

Edit this on Github

+

Edit this on GitHub

@@ -1015,18 +1015,23 @@ document.documentElement.style.setProperty('--animate-duration', '.5s'); animate__repeat-3 3 + +animate__infinite +infinite + -

As with the repeat 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 setting the --animate-repeat property to a longer or a shorter value:

+

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:

/* The element will repeat the animation 2x
-   It's better to set this property only locally and not globally or
+   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 on it. Don't forget to read the best practices section to make the best use of repeating animations.

-

Edit this on Github

+

Edit this on GitHub

@@ -1067,7 +1072,7 @@ document.documentElement.style.setProperty('--animate-duration', '.5s');

Intervals between repeats

Unfortunately, this isn't possible with pure CSS right now. You have to use Javascript to achieve this result.

-

Edit this on Github

+

Edit this on GitHub

@@ -1119,7 +1124,7 @@ animateCSS('.my-element', 'bounce').then((message) => {

If you had a hard time understanding the previous function, have a look at const, classList, arrow functions, and Promises.

-

Edit this on Github

+

Edit this on GitHub

@@ -1154,7 +1159,7 @@ animateCSS('.my-element', 'bounce').then((message) => {

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.

-

Edit this on Github

+

Edit this on GitHub

@@ -1197,7 +1202,7 @@ $ npm install

Easy peasy!

-

Edit this on Github

+

Edit this on GitHub

@@ -1205,7 +1210,7 @@ $ npm install

Accessibility

Animate.css supports the prefers-reduced-motion media query 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.

-

Edit this on Github

+

Edit this on GitHub

@@ -1233,7 +1238,7 @@ $ npm install -

Edit this on Github

+

Edit this on GitHub

@@ -1245,7 +1250,7 @@ $ npm install

Code of Conduct

This project and everyone participating in it are governed by the Contributor Covenant Code of Conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to callmeelton@gmail.com.

-

Edit this on Github

+

Edit this on GitHub

diff --git a/docsSource/compileMD.js b/docsSource/compileMD.js index 16a02f0..b7c3e9d 100644 --- a/docsSource/compileMD.js +++ b/docsSource/compileMD.js @@ -26,7 +26,7 @@ function compileMD(dir = 'sections') { const sectionTemplate = (file, content) => { const message = 'Edit this on GitHub'; const fileName = convertFileNameToId(file); - const editURL = `https://github.com/daneden/animate.css/blob/master/docsSource/sections/${file}`; + const editURL = `https://github.com/animate-css/animate.css/blob/master/docsSource/sections/${file}`; const parsedContent = md.render(content); return ` diff --git a/docsSource/sections/02-utilities.md b/docsSource/sections/02-utilities.md index 02df3fa..d72a18a 100644 --- a/docsSource/sections/02-utilities.md +++ b/docsSource/sections/02-utilities.md @@ -77,14 +77,17 @@ You can control the iteration count of the animation by adding these classes, li | `animate__repeat-1` | `1` | | `animate__repeat-2` | `2` | | `animate__repeat-3` | `3` | +| `animate__infinite` | `infinite` | -As with the repeat 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 setting the `--animate-repeat` property to a longer or a shorter value: +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 only locally and not globally or + 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 on it. Don't forget to read the [best practices](#best-practices) section to make the best use of repeating animations.