FormidableLabs / FormidableLabs/nuka-carousel

Flex parent around the carousel breaks sliding

Open
#1,067 2 comments 0 reactions 0 assignees View on GitHub
Type: Bug
Dominant language
TypeScript
Stars
3.1k
Forks
588
PR merge metrics
No merged PRs in 30d

Description

### Is there an existing issue for this?

- [X] I have searched the existing issues

### Code of Conduct

- [X] I agree to follow this project's Code of Conduct

### Question

Hey guys, first of all I want to congratulate you on the new 8th version of nuka and to tell you that I've been a delighted user of it so far.

I've hit one bump which I didn't see mentioned in the docs anywhere and that is that any time I have any DOM element wrapping my Carousel at whatever level above it it could be a direct parent, grandparent element etc. if any parent has `display: flex` or `display: grid` the carousel breaks and no longer slides.

Browser: Latest Chrome
Nuka: v8.0.1
React: 18

Funny enough I came to that conclusion when I briefly swapped the nuka-carousel for Swiper where it calculated the width of each slide as some gigantic number and then I started digging and found out that I had a parent element with `display: flex` which was causing the issue.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.