Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New scroll-position modifier #269

Open
ygongdev opened this issue Feb 8, 2021 · 0 comments
Open

New scroll-position modifier #269

ygongdev opened this issue Feb 8, 2021 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@ygongdev
Copy link
Collaborator

ygongdev commented Feb 8, 2021

Description
Adding a new scroll-position functional modifier that mimics the native scrollTop and scrollBottom.

API

  1. top
  2. left

Each API will take an numerical value or a callback that exposes the element as its first argument, e.g callback(element). This allows interacting with this.element for more flexible implementation like scrollBottom or scrollRight, if needed.

Examples
1.

<div {{scroll-position top=12 left=12}}></div>
<div {{scroll-position top=this.scrollTopCallback}}></div>
@ygongdev ygongdev changed the title New scroll position modifier New scroll-position modifier Feb 8, 2021
@elwayman02 elwayman02 added enhancement New feature or request good first issue Good for newcomers labels May 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants