Skip to content

Commit 4367369

Browse files
Adds animate__infinite to docs. Fixes #1081 (#1082)
* Adds animate__infite to docs. Fixes #1081 * Updates github edit link * Adds missing 'by'
1 parent 2d79e8f commit 4367369

3 files changed

Lines changed: 23 additions & 15 deletions

File tree

docs/index.html

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -836,7 +836,7 @@ <h2 class="docs-mainTitle">
836836
</blockquote>
837837
<p><strong>Animate.css</strong> 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.</p>
838838

839-
<p class="edit-github"><a href="https://github.com/daneden/animate.css/blob/master/docsSource/sections/00-intro.md" title="Edit this on Github">Edit this on Github</a></p>
839+
<p class="edit-github"><a href="https://github.com/animate-css/animate.css/blob/master/docsSource/sections/00-intro.md" title="Edit this on GitHub">Edit this on GitHub</a></p>
840840
</section>
841841

842842

@@ -900,7 +900,7 @@ <h4>CSS Custom Properties (CSS Variables)</h4>
900900
</code></pre>
901901
<p>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.</p>
902902

903-
<p class="edit-github"><a href="https://github.com/daneden/animate.css/blob/master/docsSource/sections/01-usage.md" title="Edit this on Github">Edit this on Github</a></p>
903+
<p class="edit-github"><a href="https://github.com/animate-css/animate.css/blob/master/docsSource/sections/01-usage.md" title="Edit this on GitHub">Edit this on GitHub</a></p>
904904
</section>
905905

906906

@@ -1015,18 +1015,23 @@ <h3>Repeating classes</h3>
10151015
<td><code>animate__repeat-3</code></td>
10161016
<td><code>3</code></td>
10171017
</tr>
1018+
<tr>
1019+
<td><code>animate__infinite</code></td>
1020+
<td><code>infinite</code></td>
1021+
</tr>
10181022
</tbody>
10191023
</table>
1020-
<p>As with the repeat and speed classes, the <code>animate__repeat</code> class is based on the <code>--animate-repeat</code> property and has a default iteration count of <code>1</code>. You can customize them setting the <code>--animate-repeat</code> property to a longer or a shorter value:</p>
1024+
<p>As with the delay and speed classes, the <code>animate__repeat</code> class is based on the <code>--animate-repeat</code> property and has a default iteration count of <code>1</code>. You can customize them by setting the <code>--animate-repeat</code> property to a longer or a shorter value:</p>
10211025
<pre><code class="language-css">/* The element will repeat the animation 2x
1022-
It's better to set this property only locally and not globally or
1026+
It's better to set this property locally and not globally or
10231027
you might end up with a messy situation */
10241028
.my-element {
10251029
--animate-repeat: 2;
10261030
}
10271031
</code></pre>
1032+
<p>Notice that <code>animate__infinite</code> doesn't use any custom property and changes to <code>--animate-repeat</code> will have no effect on it. Don't forget to read the <a href="#best-practices">best practices</a> section to make the best use of repeating animations.</p>
10281033

1029-
<p class="edit-github"><a href="https://github.com/daneden/animate.css/blob/master/docsSource/sections/02-utilities.md" title="Edit this on Github">Edit this on Github</a></p>
1034+
<p class="edit-github"><a href="https://github.com/animate-css/animate.css/blob/master/docsSource/sections/02-utilities.md" title="Edit this on GitHub">Edit this on GitHub</a></p>
10301035
</section>
10311036

10321037

@@ -1067,7 +1072,7 @@ <h3>Overflow</h3>
10671072
<h3>Intervals between repeats</h3>
10681073
<p>Unfortunately, this isn't possible with pure CSS right now. You have to use Javascript to achieve this result.</p>
10691074

1070-
<p class="edit-github"><a href="https://github.com/daneden/animate.css/blob/master/docsSource/sections/03-best-practices.md" title="Edit this on Github">Edit this on Github</a></p>
1075+
<p class="edit-github"><a href="https://github.com/animate-css/animate.css/blob/master/docsSource/sections/03-best-practices.md" title="Edit this on GitHub">Edit this on GitHub</a></p>
10711076
</section>
10721077

10731078

@@ -1119,7 +1124,7 @@ <h2>Usage with Javascript</h2>
11191124
</code></pre>
11201125
<p>If you had a hard time understanding the previous function, have a look at <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/const">const</a>, <a href="https://developer.mozilla.org/en-US/docs/Web/API/Element/classList">classList</a>, <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions">arrow functions</a>, and <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise">Promises</a>.</p>
11211126

1122-
<p class="edit-github"><a href="https://github.com/daneden/animate.css/blob/master/docsSource/sections/04-javascript.md" title="Edit this on Github">Edit this on Github</a></p>
1127+
<p class="edit-github"><a href="https://github.com/animate-css/animate.css/blob/master/docsSource/sections/04-javascript.md" title="Edit this on GitHub">Edit this on GitHub</a></p>
11231128
</section>
11241129

11251130

@@ -1154,7 +1159,7 @@ <h2>Migration from v3.x and under</h2>
11541159
</code></pre>
11551160
<p>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 <code>animate.compat.css</code> file.</p>
11561161

1157-
<p class="edit-github"><a href="https://github.com/daneden/animate.css/blob/master/docsSource/sections/06-migration.md" title="Edit this on Github">Edit this on Github</a></p>
1162+
<p class="edit-github"><a href="https://github.com/animate-css/animate.css/blob/master/docsSource/sections/06-migration.md" title="Edit this on GitHub">Edit this on GitHub</a></p>
11581163
</section>
11591164

11601165

@@ -1197,15 +1202,15 @@ <h3>Changing the default prefix</h3>
11971202
</code></pre>
11981203
<p>Easy peasy!</p>
11991204

1200-
<p class="edit-github"><a href="https://github.com/daneden/animate.css/blob/master/docsSource/sections/07-custom-builds.md" title="Edit this on Github">Edit this on Github</a></p>
1205+
<p class="edit-github"><a href="https://github.com/animate-css/animate.css/blob/master/docsSource/sections/07-custom-builds.md" title="Edit this on GitHub">Edit this on GitHub</a></p>
12011206
</section>
12021207

12031208

12041209
<section class="docSection-accessibility" id="accessibility">
12051210
<h2>Accessibility</h2>
12061211
<p>Animate.css supports the <a href="https://webkit.org/blog/7551/responsive-design-for-motion/"><code>prefers-reduced-motion</code> media query</a> 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 &quot;reduce motion&quot; on their operating system preferences and it will turn off CSS transitions for them without any further work required.</p>
12071212

1208-
<p class="edit-github"><a href="https://github.com/daneden/animate.css/blob/master/docsSource/sections/08-accessibility.md" title="Edit this on Github">Edit this on Github</a></p>
1213+
<p class="edit-github"><a href="https://github.com/animate-css/animate.css/blob/master/docsSource/sections/08-accessibility.md" title="Edit this on GitHub">Edit this on GitHub</a></p>
12091214
</section>
12101215

12111216

@@ -1233,7 +1238,7 @@ <h2>Core team</h2>
12331238
</tbody>
12341239
</table>
12351240

1236-
<p class="edit-github"><a href="https://github.com/daneden/animate.css/blob/master/docsSource/sections/09-contributors.md" title="Edit this on Github">Edit this on Github</a></p>
1241+
<p class="edit-github"><a href="https://github.com/animate-css/animate.css/blob/master/docsSource/sections/09-contributors.md" title="Edit this on GitHub">Edit this on GitHub</a></p>
12371242
</section>
12381243

12391244

@@ -1245,7 +1250,7 @@ <h3>Contributing</h3>
12451250
<h3>Code of Conduct</h3>
12461251
<p>This project and everyone participating in it are governed by the <a href="https://github.com/animate-css/animate.css/blob/master/CODE_OF_CONDUCT.md">Contributor Covenant Code of Conduct</a>. By participating, you are expected to uphold this code. Please report unacceptable behavior to <a href="mailto:callmeelton@gmail.com">callmeelton@gmail.com</a>.</p>
12471252

1248-
<p class="edit-github"><a href="https://github.com/daneden/animate.css/blob/master/docsSource/sections/09-license-contributing.md" title="Edit this on Github">Edit this on Github</a></p>
1253+
<p class="edit-github"><a href="https://github.com/animate-css/animate.css/blob/master/docsSource/sections/09-license-contributing.md" title="Edit this on GitHub">Edit this on GitHub</a></p>
12491254
</section>
12501255

12511256
</div>

docsSource/compileMD.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ function compileMD(dir = 'sections') {
2626
const sectionTemplate = (file, content) => {
2727
const message = 'Edit this on GitHub';
2828
const fileName = convertFileNameToId(file);
29-
const editURL = `https://github.com/daneden/animate.css/blob/master/docsSource/sections/${file}`;
29+
const editURL = `https://github.com/animate-css/animate.css/blob/master/docsSource/sections/${file}`;
3030
const parsedContent = md.render(content);
3131

3232
return `

docsSource/sections/02-utilities.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,14 +77,17 @@ You can control the iteration count of the animation by adding these classes, li
7777
| `animate__repeat-1` | `1` |
7878
| `animate__repeat-2` | `2` |
7979
| `animate__repeat-3` | `3` |
80+
| `animate__infinite` | `infinite` |
8081

81-
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:
82+
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:
8283

8384
```css
8485
/* The element will repeat the animation 2x
85-
It's better to set this property only locally and not globally or
86+
It's better to set this property locally and not globally or
8687
you might end up with a messy situation */
8788
.my-element {
8889
--animate-repeat: 2;
8990
}
9091
```
92+
93+
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.

0 commit comments

Comments
 (0)