Splidejs / splide

Splide is a lightweight, flexible and accessible slider/carousel written in TypeScript. No dependencies, no Lighthouse errors.
https://splidejs.com
MIT License
4.83k stars 418 forks source link

When going to the next slide, the next slide seems to have a left margin, but it doesn't. #1227

Open carolloiola1200 opened 1 year ago

carolloiola1200 commented 1 year ago

Checks

Version

4.1.4

Description

currently have Splide configured in the exact same way as it is set up on another website I've implemented in Webflow. However, for some reason, it's exhibiting this unusual behavior where when I click to navigate to the next slide, the subsequent slide appears shifted more to the right instead of being aligned with the previous one. Has anyone experienced this before?

Reproduction Link

https://yumeda-440efa142b063fe6e53a00e0604edb0a.webflow.io/blog-articles/can-we-truly-create-value-copy

Steps to Reproduce

  1. Go to the mobile or tablet version
  2. Scroll to the related article section

Expected Behaviour

When scrolling or tapping on the arrow to go to the next slide, the next slide will appear more to the right instead of the same place

bes-internal commented 11 months ago

Not a Splide bug!

Remove your own styles from splide__list:

.splide__list {
    grid-column-gap: 32px;
    grid-row-gap: 16px;
    grid-template-rows: auto;
    grid-template-columns: 1fr 1fr 1fr;
    grid-auto-columns: 1fr;
    display: grid;
}

because grid-*-gap work for flex too