davidjerleke / embla-carousel

A lightweight carousel library with fluid motion and great swipe precision.
https://www.embla-carousel.com
MIT License
5.37k stars 164 forks source link

[Bug]: Trailing spaces #894

Closed yashnerkar closed 3 weeks ago

yashnerkar commented 3 weeks ago

Which variants of Embla Carousel are you using?

Steps to reproduce

The bug occurred when I added the embla carousel with opacity. I have added the options as align: "center", containScroll:"trim snaps", but still have not removed the trailing spaces.

Expected Behavior

Adding the containScroll : timesnaps it should remove the trailing spaces.

Additional Context

I have also tried...

What browsers are you seeing the problem on?

No response

Version

8.0.0

CodeSandbox

https://codesandbox.io/p/sandbox/embla-carousel-opacity-react-forked-c8dzzk

Before submitting

davidjerleke commented 3 weeks ago

@yashnerkar this has nothing to do with the trimSnaps option. You're trying to tween custom styles and using scale which is misplacing elements. Don't apply your tween to the outer slide element but rather on any element inside it instead. Like the image for example. See this CodeSandbox.

This issue is scheduled for deletion and will be deleted as soon as you've seen the CodeSandbox.