Carousel has no width if parent uses Flexbox
See original GitHub issueDescribe the bug
I am using the carousel inside a section element which uses Flexbox, but the BrainhubCarousel__track
and the BrainhubCarouselItem
elements are all getting width: 0px; max-width: 0px; min-width: 0px;
To Reproduce I created this CodeSandbox which reproduces the issue.
Expected behavior Slides and track elements should get the appropriate width.
Screenshots If applicable, add screenshots to help explain your problem.
Environment
System:
OS: macOS 10.15.3
CPU: (8) x64 Intel(R) Core(TM) i7-7920HQ CPU @ 3.10GHz
Memory: 241.82 MB / 16.00 GB
Binaries:
Node: 10.13.0 - ~/.nvm/versions/node/v10.13.0/bin/node
Yarn: 1.21.1 - /usr/local/bin/yarn
npm: 6.4.1 - ~/.nvm/versions/node/v10.13.0/bin/npm
Browsers:
Chrome: 80.0.3987.149
Firefox: 74.0
Safari: 13.0.5
IssueHunt Summary
max-arias has been rewarded.
Backers (Total: $56.00)
- piotr-s-brainhub ($56.00)
Submitted pull Requests
Tips
- Checkout the Issuehunt explorer to discover more funded issues.
- Need some help from other developers? Add your repositories on IssueHunt to raise funds.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:8 (4 by maintainers)
Top Results From Across the Web
html - Flexbox inside carousel - No resizing - Stack Overflow
I've successfully coded a simple carousel based on three items being shown inside a flexbox. The movement of the carousel is based on ......
Read more >Not a bug - Carousel.less width increases, losing control ...
Not a bug Carousel.less width increases, losing control, when Carousel container is being used inside an element of a Flexbox container.
Read more >Grid system - Bootstrap
Bootstrap's grid system uses a series of containers, rows, and columns to layout and align content. It's built with flexbox and is fully...
Read more >Typical use cases of flexbox - CSS: Cascading Style Sheets
In this guide, we will take a look at some of the common use cases for flexbox — those places where it makes...
Read more >Adjusting the Container's Size and Behavior - Elementor
If the container is nested in a parent container, the nested will take the full parent's content width. Boxed vs. Full Width. If,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@piotr-s-brainhub has rewarded $50.40 to @max-arias. See it on IssueHunt
@max-arias
Could you address the last comments in https://github.com/brainhubeu/react-carousel/pull/467 ?