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

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

Open
bakura10 opened this issue Oct 19, 2023 · 0 comments
Open

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

bakura10 opened this issue Oct 19, 2023 · 0 comments
Labels
Feature Feature request

Comments

@bakura10
Copy link
Collaborator

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.

@bakura10 bakura10 added the Feature Feature request label Oct 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Feature Feature request
Projects
None yet
Development

No branches or pull requests

1 participant