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

Flickering issue on auto scroll with transform:matrix or transform:rotate on parent #1225

Open wojtekpiskorz opened 1 year ago

wojtekpiskorz commented 1 year ago

Checks

Version

v4.1.2

Description

When we have auto scroll on and want to transform the whole slider there are bugs with it.

when we want to transform:matrix at the end of loop cycle it will flicker (probably for about of time it takes to scroll through the about of pixels that were "moved" from the default position that list is reading)

when we wan to transform:rotate it breaks the speed. It wont recognize the speed: value but instead it would give some random boosts. When the value is >0 f.e rotate(3deg) it would tremendously increase the speed of auto scrolling while when the rotate(-3deg) it would decrease it.

Reproduction Link

https://codepen.io/honestlydesign/pen/eYbgBea https://sandbox.honestly.design/slider-logo-animation

Steps to Reproduce

  1. Create an autoscroll type of slider
  2. Add some images inside slides
  3. add styling to .splide (or .splide__track)
  4. example of styling that create a bug:
    • transform: rotateZ(5deg);
    • transform:matrix(1, 0.27, -0.8, 0.7, 0, 0);

Expected Behaviour

On finishing the loop it would not flicker but smoothly start the next circle when using matrix() It would accept the speed key value instead of breaking it when using rotate()

XPD-Kasun commented 5 months ago

This is a bug I guess. When the container or the slider rotated, slider starts to scroll in an unexpected way.