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

Wrong width of next slide when using padding and gap #1255

Open
2 tasks done
lukaszahorec opened this issue Nov 29, 2023 · 0 comments
Open
2 tasks done

Wrong width of next slide when using padding and gap #1255

lukaszahorec opened this issue Nov 29, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@lukaszahorec
Copy link

Checks

Version

4.1.3

Description

Hi,

After initial load of slider with using padding and gap, the "next slide" has wrong width respectively the width seems good but its pushed more to the right side and overflowing the container.

If I hit next/prev slide or use method refresh() (or autoplay is true) than it's corrected.

let splide = new Splide( '.splide', { type : 'loop', padding: '181px', perPage: 1, gap: '24px', updateOnMove: true, drag: false, autoplay: false, interval: 5000, });

Reproduction Link

https://codepen.io/luk-z-horec/pen/oNJpdWN

Steps to Reproduce

  1. Use padding
  2. Use gap
  3. Autoplay: false
  4. type: loop

Expected Behaviour

The prev and next slide should have the same visible width.

@lukaszahorec lukaszahorec added the bug Something isn't working label Nov 29, 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
Projects
None yet
Development

No branches or pull requests

1 participant