Skip to content

CSS-Mode - scroll-padding is ignored #4996

Open
@ezadoo

Description

@ezadoo

Check that this is really a bug

  • 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

  • Follow our Code of Conduct
  • Read the docs.
  • Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
  • 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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions