oddbird / oddbird/css-anchor-positioning

[BUG] Popover finds different anchor

Open
#322 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
TypeScript
Stars
493
Forks
18
Avg merge
12h 37m
Merged PRs (30d)
5

Description

Describe the bug
An anchored popover is finding a different anchor element than the Chromium implementation.

To Reproduce

  1. Go to https://codepen.io/jamessw/pen/yyyBwao and open the popover
  2. In Chromium, the resolved anchor is the last anchor in the tree
  3. The polyfill resolves the anchor as the popover button

Expected behavior
Include relevant parts of the spec, and a clear and concise description of what you expected to happen.

Browsers tested on
Firefox 124 (has popover polyfilled as well)
Firefox 137
Chromium 135

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the CodePen reproduction and compare the polyfill's resolved anchor with Chromium 135, then read the CSS Anchor Positioning specification linked in the issue. The work is done when the polyfill resolves the same last anchor in the tree as Chromium for this popover case.

Written by the indexing model from the issue text.

Assessment

Tech stack
css, typescript
Domain
frontend, web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.