Skip to content

[css-scroll-anchoring-1] Fix anchor selection step. #12342

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

Merged
merged 2 commits into from
Jun 16, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions css-scroll-anchoring-1/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,12 @@ non-atomic inline element as the priority candidate.
whose computed value of the 'overflow-anchor' property is ''overflow-anchor/none'',
then do not select an anchor node for |S|.
2. Otherwise, for each <a>priority candidate</a> |PC| in order specified,
check if |PC| is a <a>viable candidate</a> in |S|. If so, select it as an
anchor node and terminate.
check if |PC| is a <a>viable candidate</a> in |S|.
If so, perform the <a>candidate examination algorithm</a> for |PC| in |S| and terminate.

Note: Since the priority candidate itself is checked to be viable, the <a>candidate examination algorithm</a>
is guaranteed to select at least the candidate node itself.

3. Otherwise, for each DOM child |N| of the element or document associated with |S|,
perform the <a>candidate examination algorithm</a> for |N| in |S|,
and terminate if it selects an anchor node.
Expand Down Expand Up @@ -345,3 +349,4 @@ Changes Since the Feb 11 2020 Working Draft</h3>

* Added definitions of [=viable candidate=] and [=priority candidate=].
* Clarified interaction between scroll anchoring and [=scroll snapping=].
* Added a step to run <a>candidate examination algorithm</a> on viable priority candidates.