swiper icon indicating copy to clipboard operation
swiper copied to clipboard

CSS-Mode - scroll-padding is ignored

Open ezadoo opened this issue 4 years ago • 2 comments

Check that this is really a bug

  • [X] I confirm

Reproduction link

https://codepen.io/ezadoo/pen/VwWEZBZ

Bug description

If you set a scroll-padding for the slider, for a custom alignment, swiper is always animating to the left edge of the container. The defined scroll-padding value is getting ignored, and so the slider snaps back to the scroll-padding after the animation is done.

Expected Behavior

In CSS-Mode Swiper should treat the scroll-padding as the edge of the animation and should calculate this in account for the translation-value.

Actual Behavior

The left edge is used for the calculation and the scroll-padding is ignored, so the slider snaps back to the set scroll-padding after the animation.

Swiper version

7.0.6

Platform/Target and Browser Versions

all

Validations

  • [X] Follow our Code of Conduct
  • [X] Read the docs.
  • [X] Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
  • [X] Make sure this is a Swiper issue and not a framework-specific issue

Would you like to open a PR for this bug?

  • [ ] I'm willing to open a PR

ezadoo avatar Sep 24 '21 14:09 ezadoo

Right now it is not supported as there is no alternative for it not in CSS mode

nolimits4web avatar Sep 24 '21 14:09 nolimits4web

Haven't found a simple workaround for this one. It'd be a great addition.

iplanwebsites avatar Oct 12 '23 12:10 iplanwebsites