[css-overflow-5] Missing determine scroll-into-view params?
Nobody has claimed this yet.
- Dominant language
- Bikeshed
- Stars
- 4.9k
- Forks
- 816
- PR merge metrics
- PR metrics pending
Description
The example on how to determine the active scroll marker in the css-overflow-5 spec directs user agents to run the determine-the-scroll-into-view-position algorithm but does not provide block and inline arguments which determine the alignment of the scroll container with its subject and default to "nearest".
I believe the intention for snap targets was to use the alignment indicated by scroll-snap-align but for non-snap targets, it seems we'd naturally be defaulting to "nearest". However, "nearest" might not be the best option as it means the target position, which is used to determine whether a target is within half a scroll port from the current scroll position, might have the target outside the viewport. I.e. the "nearest" scroll position that brings the element into view might be half a scroll port away from the current scroll position while the target's position itself is not. (See demo)
I propose we we have the algorithm supply "start" block and inline values as these would ensure that the target is within view when selected.
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 with the CSS Overflow 5 example and the CSSOM View determine-the-scroll-into-view-position algorithm linked in the issue. Work out which block and inline arguments the active scroll marker algorithm should supply, considering snap and non-snap targets, then update the relevant specification text so the target-position behavior is unambiguous.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- css
- Domain
- documentation
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 28/100