Skip to content

Transitions animations #38296

New issue

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

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

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions scss/_helpers.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@
@import "helpers/stretched-link";
@import "helpers/text-truncation";
@import "helpers/vr";
@import "helpers/animations";
12 changes: 12 additions & 0 deletions scss/helpers/_animations.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
.animation-direction-normal{
animation-direction: normal;
}
.animation-direction-reverse{
animation-direction: reverse;
}
.animation-direction-alternate{
animation-direction: alternate;
}
.animation-direction-alternate-reverse{
animation-direction: alternate-reverse;
}
36 changes: 36 additions & 0 deletions site/content/docs/5.3/helpers/animations.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
layout: docs
title: Animations
description: Customize the animation direction of all the different components.
group: helpers
aliases: "/docs/5.3/helpers/"
---

Easily customize `animation-direction`s by adding the appropriate class.

The available classes:

```scss
.animation-direction-normal{
animation-direction: normal;
}
.animation-direction-reverse{
animation-direction: reverse;
}
.animation-direction-alternate{
animation-direction: alternate;
}
.animation-direction-alternate-reverse{
animation-direction: alternate-reverse;
}
```



The following example shows how the class `animation-direction-reverse` was used to reverse the animation direction of a spinner-border.

{{< example >}}
<div class="spinner-border text-primary animation-direction-reverse" role="status">
<span class="visually-hidden">Loading...</span>
</div>
{{< /example >}}
1 change: 1 addition & 0 deletions site/data/sidebar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@
icon: magic
icon_color: orange
pages:
- title: Animations
- title: Clearfix
- title: Color & background
- title: Colored links
Expand Down