[cssom-view] Clarify fallback for left and top options of scrollBy when absent
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 62/100
- Issue type
- Documentation
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- css
- Domain
- documentation
Research direction
Start with the CSSOM View specification sections linked in the issue, comparing the element.scrollBy and window.scrollBy algorithms. Clarify that absent left and top values fall back to 0 before the scroll offsets are added, and ensure both algorithms state this unambiguously.
Written by the indexing model from the issue text.
Description
For the one-parameter version of element.scrollBy and window.scrollBy, we have the following algorithms:
From https://drafts.csswg.org/cssom-view/#dom-element-scrollby:
Let options be the argument.
Normalize non-finite values for left and top dictionary members of options, if present.
Add the value of scrollLeft to the left dictionary member.
Add the value of scrollTop to the top dictionary member.
Act as if the scroll() method was invoked with options as the only argument.
From https://drafts.csswg.org/cssom-view/#dom-window-scrollby:
Normalize non-finite values for the left and top dictionary members of options.
Add the value of scrollX to the left dictionary member.
Add the value of scrollY to the top dictionary member.
Act as if the scroll() method was invoked with options as the only argument.
Adding scroll values when left or top are absent would lead to NaN and hence scroll() later would normalize the coordinates to 0. I think what we want instead is to fallback to 0 before adding the scroll values.
- Dominant language
- Bikeshed
- Stars
- 4.9k
- Forks
- 816
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 24
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.
More from w3c/csswg-drafts
-
Agenda+ css-sizing-4 css-values-5
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
w3c/csswg-drafts#14502 · 1 reaction ·
-
css-values-5 editorial Needs Edits
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
w3c/csswg-drafts#14498 · 2 comments ·
-
css-overflow-4 topic: line-clamp
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
w3c/csswg-drafts#14485 · 1 comment ·
-
Administrative Tracker css-values-4
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
w3c/csswg-drafts#14482 · 4 comments · 1 reaction ·
-
css-values-5 Needs Edits
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
w3c/csswg-drafts#14466 ·
All issues in w3c/csswg-drafts
Similar issues
-
user-reported
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Kong/developer.konghq.com#7316 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
HarperFast/skills#96 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
infinispan/infinispan#18150 ·
-
bug triage:deciding
Difficulty 1/5 Under an hour Newbie friendliness 88/100
open-telemetry/otel-arrow#4132 ·
-
Ecosystem: ClawMetry — the Qwen Code reader is now free and open source (follow-up to #9294 / #9338) Opencategory/integration priority/P3 scope/documentation status/ready-for-human type/feature-request
Difficulty 1/5 Under an hour Newbie friendliness 84/100