Skip to content

Commit

Permalink
docs: add new mui-series paused behavior and rollback
Browse files Browse the repository at this point in the history
  • Loading branch information
ncoden committed May 4, 2018
1 parent efd6e38 commit 290855e
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 1 deletion.
6 changes: 6 additions & 0 deletions docs/animations.md
Expand Up @@ -107,6 +107,12 @@ document.querySelector('.animation-wrapper').classList.add('is-animating');
$('.animation-wrapper').addClass('is-animating');
```

### Paused behavior

From Motion UI v1.3.0, the animation is reset when `.is-animating` is removed from an animated or animating element. This is the only way we found to make animation work on macOS Safari.

To rollback to the previous behavior and make the animation pause when `.is-animating` is removed, add `.mui-pause` to the parent container. This can be set on `body` to affect all animations.

## Use with WOW.js

Motion UI can be paired with WOW.js to animate elements in as the page scrolls. [Learn more about WOW.js integration.](wow.md);
Expand Down
1 change: 1 addition & 0 deletions docs/configuration.md
Expand Up @@ -55,6 +55,7 @@ $motion-ui-settings: (
hinge-and-fade: true,
scale-and-fade: true,
spin-and-fade: true,
pause-queue-class: 'mui-pause',
activate-queue-class: 'is-animating'
);
```
Expand Down
6 changes: 6 additions & 0 deletions docs/src/animations.md
Expand Up @@ -114,6 +114,12 @@ document.querySelector('.animation-wrapper').classList.add('is-animating');
$('.animation-wrapper').addClass('is-animating');
```

### Paused behavior

From Motion UI v1.3.0, the animation is reset when `.is-animating` is removed from an animated or animating element. This is the only way we found to make animation work on macOS Safari.

To rollback to the previous behavior and make the animation pause when `.is-animating` is removed, add `.mui-pause` to the parent container. This can be set on `body` to affect all animations.

## Use with WOW.js

Motion UI can be paired with WOW.js to animate elements in as the page scrolls. [Learn more about WOW.js integration.](wow.md);
1 change: 1 addition & 0 deletions docs/src/configuration.md
Expand Up @@ -58,6 +58,7 @@ $motion-ui-settings: (
hinge-and-fade: true,
scale-and-fade: true,
spin-and-fade: true,
pause-queue-class: 'mui-pause',
activate-queue-class: 'is-animating'
);
```
2 changes: 1 addition & 1 deletion src/_settings.scss
Expand Up @@ -57,6 +57,6 @@ $motion-ui-settings: (
hinge-and-fade: true,
scale-and-fade: true,
spin-and-fade: true,
pause-queue-class: 'pause',
pause-queue-class: 'mui-pause',
activate-queue-class: 'is-animating',
) !default;

0 comments on commit 290855e

Please sign in to comment.