Skip to content

scroll-margin / scroll-padding are not taken into account #196

@Voltra

Description

@Voltra

Describe the bug
When using Lenis#scrollTo to scroll to an element, the scroll-margin and/or scroll-padding properties are ignored, thus making it scroll beyond the desired point.

To Reproduce
This minimal codepen.

Desired Behavior

scroll-margin and scroll-padding should be used when determining where to stop scrolling (like the native Element#scrollIntoView does).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions