WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
310398
[css-anchor-position-1] Accommodate pseudo-elements when sorting anchor elements by tree order
https://bugs.webkit.org/show_bug.cgi?id=310398
Summary
[css-anchor-position-1] Accommodate pseudo-elements when sorting anchor eleme...
Kiet Ho
Reported
2026-03-20 15:18:55 PDT
[css-anchor-position-1] Accommodate pseudo-elements when sorting anchor elements by tree order
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2026-03-20 15:19:05 PDT
<
rdar://problem/173032203
>
maikelkrause
Comment 2
2026-03-20 15:46:06 PDT
Relevant test:
https://codepen.io/maikelkrause/pen/raMOVNN?editors=1100
The second (purple) chain uses `::after` pseudo-elements anchored to one another.
Kiet Ho
Comment 3
2026-03-20 23:16:39 PDT
If there are multiple matching anchors with the same, the spec says we should sort them by tree order and take the last one. The bug is that the current sorting code can't figure out which pseudo-element is before another pseudo element. So if you have a chain like 1 <- 2 <- 3, and they both have the same anchor name, it's possible for 3 to chain to 1 or 2. The behavior is sorta non-deterministic, so it's possible for 3 to chain to 2 sometimes and to 1 some other times.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug