Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

slidesToScroll: 'auto' isn't compatible with margins or gap slide spacings #536

Closed
1 task done
Tracked by #321
davidjerleke opened this issue Jul 15, 2023 · 0 comments · Fixed by #537
Closed
1 task done
Tracked by #321

slidesToScroll: 'auto' isn't compatible with margins or gap slide spacings #536

davidjerleke opened this issue Jul 15, 2023 · 0 comments · Fixed by #537
Labels
bug Something isn't working resolved This issue is resolved

Comments

@davidjerleke
Copy link
Owner

Bug is related to

  • embla-carousel (core package)

Embla Carousel version

  • v7.0.0 and up to the latest v8.0.0-rc11

Describe the bug

  • When slide spacings are set with the CSS gap or margin property, slidesToScroll: 'auto' fails to group slides automatically based on their size.

CodeSandbox

Steps to reproduce

  1. Go to the sandbox.
  2. Swipe to slide 3 and forward until the end.
  3. Slide [3, 4], [5, 6] should be grouped together but slide 3, 4, 5 and 6 aren't grouped with any other slide.

Expected behavior

  • When slide spacings are set with the CSS gap property or margin properties, slidesToScroll: 'auto' should group slides correctly. In the sandbox example, slides should be grouped as follows: [1, 2], [3, 4], [5, 6], [7, 8].
@davidjerleke davidjerleke added the bug Something isn't working label Jul 15, 2023
This was referenced Jul 15, 2023
@davidjerleke davidjerleke added the upcoming A feature or bug fix is on its way for this issue label Jul 17, 2023
davidjerleke added a commit that referenced this issue Jul 18, 2023
@davidjerleke davidjerleke added resolved This issue is resolved and removed upcoming A feature or bug fix is on its way for this issue labels Jul 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working resolved This issue is resolved
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant