CityOfDetroit / COD-Design-System

Design system for the City of Detroit.
https://cityofdetroit.github.io/COD-Design-System/
MIT License
1 stars 3 forks source link

Fix carousel transition animations on 'next' #236

Closed maxatdetroit closed 4 months ago

maxatdetroit commented 4 months ago

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

Testing

See before video in #235.

After the changes:

https://github.com/CityOfDetroit/COD-Design-System/assets/143553259/3ff21807-7b79-4383-852f-23da6f010958