This PR addresses performance issues with the Carousel component.
By having all slides "visible" at the same time (just hidden because of their negative z-index), the browser had to perform a lot of unnecessary calculations. This made the carousel unusable for a high number of elements. It also caused a single-frame flickering issue at large screen sizes.
I am not sure if this fixes the flickering issue completely, but in my tests it has.
I have also added a client-side load test to the demo with 50 slides. Prior to this fix I couldn't even scroll the page with that many slides.
This PR addresses performance issues with the Carousel component.
By having all slides "visible" at the same time (just hidden because of their negative z-index), the browser had to perform a lot of unnecessary calculations. This made the carousel unusable for a high number of elements. It also caused a single-frame flickering issue at large screen sizes.
I am not sure if this fixes the flickering issue completely, but in my tests it has.
I have also added a client-side load test to the demo with 50 slides. Prior to this fix I couldn't even scroll the page with that many slides.