ui icon indicating copy to clipboard operation
ui copied to clipboard

Offset calculation error in carousel

Open alekseydrv opened this issue 2 years ago • 1 comments

Hello,

I have a carousel and width of .carousel__slide is like that: calc((100% - 60px) / 4); 60px is for 'margin-right' between slides;

If I scroll to the right round about 40-50 slides, I see a part of fifth slide.

Screenshot: https://paste.pics/H530C

And the distance between last and first slide is bigger than the rest: https://paste.pics/H544E

Example: https://codepen.io/alekseydrv/pen/LYQmvVm

alekseydrv avatar Jun 02 '22 10:06 alekseydrv

Hi,

Please, in cases like this, do not use margins for slide elements. Use some inner wrapping element instead with a left/right padding to create a space around your content.

fancyapps avatar Jun 07 '22 18:06 fancyapps

Hi,

Please, upgrade to v5, it should work as expected.

fancyapps avatar Mar 12 '23 12:03 fancyapps