Skip to content
This repository was archived by the owner on Nov 12, 2024. It is now read-only.
This repository was archived by the owner on Nov 12, 2024. It is now read-only.

[Feature] Add an "inset" to the scroll getsures #233

@bakura10

Description

@bakura10

Hi,

I am recently experimenting with the native Scroll Animation feature (https://www.w3.org/TR/scroll-animations-1/) and one very useful thing is the ability to have an inset for the scroll gesture (which allows to take into account sticky elements for instance):

const timeline = new ViewTimeline({
        subject: this,
        axis: 'block',
        inset: `${getComputedStyle(this).getPropertyValue('--sticky-area-height')} 0px`
      });

Motion API maps pretty nicely as a fallback for browsers not supporting it, but it just lacks this inset feature.

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FeatureFeature request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions