question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Incorrect slide sizing on load, using two carousels

See original GitHub issue

Describe the problem I’m using two related carousels similar to https://codepen.io/lukaszflorczak/pen/yrQyBj

On load, the smaller/secondary carousel loads at a much larger size than expected, seemingly at the full container width instead of a width based on slide count.

I assume I’m missing a simple detail, but it is escaping me at present.

Code I attempted to get the gist of what I’m doing in my project here: https://codepen.io/justin-RB/pen/BaopNKW

I am not currently setting the height of the thumbnail slides, but upon adding the following, the problem persists.

.slide--thumbnail {
  height: 100px;
}

Expected behavior Slides to load at the appropriate size.

Screenshots ezgif-3-4bd1f4e9dc1d

Additional context Can confirm the same result in Chrome, Safari, Firefox (at least on MacOS 10.15)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
lukaszflorczakcommented, Apr 22, 2020

Thank you very much for ☕️☕️☕️☕️☕️☕️ I really appreciate that 😊

1reaction
lukaszflorczakcommented, Apr 22, 2020

Right. In this case, if you reload agile (by method or key) you have to update asNavFor refs. So I propose something like that – the key to refresh carousels and asNavFor update in watcher: https://codepen.io/lukaszflorczak/pen/WNQRrbb?editors=0011

Read more comments on GitHub >

github_iconTop Results From Across the Web

Carousel Slider slides incorrectly when creating multiple ...
The issue seems to lie in the fCarousel function where profileCount is counting every item belonging to every carousel.
Read more >
Incorrect slide width on initial load - WordPress.org
I have an issue with SA Slider when browser window is wider than boxed content max width. Please see console on linked page...
Read more >
Problem with images resizing in carousel - HTML & CSS
I have tried to set them all to be the same size, but it doesn't seem to matter, they are still different sizes....
Read more >
Best practices for carousels - web.dev
Performance best practices. Load carousel content using HTML; Avoid layout shifts; Use modern technology; Optimize carousel content ; Performance ...
Read more >
Bootstrap Carousel Slide Motion Glitch(on the time of motion)
I am able to play carousel, My problem is in how carousel loads slides of different sizes Download following .txt file, change its...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found