[css-scroll-snap] Programmatically scroll to snap points
Nobody has claimed this yet.
- Dominant language
- Bikeshed
- Stars
- 4.9k
- Forks
- 816
- PR merge metrics
- PR metrics pending
Description
@Schepp mentioned in #156 that he'd like to have a way to programmatically scroll to a certain snap point.
There are indeed use cases in which authors may want more explicit control over the scroll position when scrolling with a scroll container. E.g. scrolling to a specific image in a gallery.
A possible solution for that would be to reuse the scrollTo() function for that. Its ScrollToOptions dictionary could be extended by a new option indicating a snap point.
Sebastian
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the css-scroll-snap material and the linked CSSOM View scrollTo() definition. Determine how an additional ScrollToOptions member could identify a snap point and what behavior is required for galleries and other scroll containers. Done means the proposal has a settled API and specified behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- css
- Domain
- web-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100