Skip to content
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

Fix carousel transition animations on 'next' #236

Merged
merged 2 commits into from
Jun 28, 2024
Merged

Fix carousel transition animations on 'next' #236

merged 2 commits into from
Jun 28, 2024

Conversation

maxatdetroit
Copy link
Member

Fixes #235

Previously, the slide animation when going to the next carousel item was appearing to not trigger. The root cause is that each subsequent item in the carousel has a higher stacking context, so when the next item is moved from display: none to display: block, it immediately replaces previous items visually while the slide animation happens in the background and out of view.

This PR

  • Explicitly set the stacking context using z-index to ensure that buttons are always clickable and the .active carousel item is always on top so that the slide animation is visible until the transition completes.

Testing

See before video in #235.

After the changes:

2024-06-28.11-06-42.mp4

@maxatdetroit maxatdetroit added the bug Something isn't working label Jun 28, 2024
@maxatdetroit maxatdetroit self-assigned this Jun 28, 2024
@maxatdetroit maxatdetroit merged commit bb19656 into dev Jun 28, 2024
5 checks passed
@maxatdetroit maxatdetroit changed the title Fix carousel transition animations on 'next Fix carousel transition animations on 'next' Jun 28, 2024
@jedgar1mx jedgar1mx deleted the issue.235 branch July 25, 2024 16:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Carousel transition animations broken on 'next'
1 participant