oddbird / oddbird/css-anchor-positioning

applying the polyfill to dynamic elements

Open
#91 13 comments 18 reactions 0 assignees View on GitHub

@jgerigmeyer is already working on this.

Since Sep 22, 2023.

  • #123 by @jgerigmeyer — open
α alpha
Dominant language
TypeScript
Stars
493
Forks
18
Avg merge
12h 37m
Merged PRs (30d)
5

Description

Hey! thx for the polyfill!

I'm trying to bolt it onto a dropdown and I'm applying the polyfil after the dropdown is open. This works. But when I close the dropdown and open it again - the css-vars on the element aren't being set.

As far as I understood from the code since the CSS was already transformed and there are no anchor() functions anymore no elements are targeted

is it somehow possible to achieve what i'm trying to achieve? :)

UPD: ahh, I see now that "dynamically added/removed anchors or targets" is not yet supported 😢

fwiw, I'm ready to help if any help is needed

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

Review issue #91 alongside linked pull request #123; the issue names no files, tests, or entry points. Confirm the intended behavior for dynamically added or removed anchors and targets, then verify that reopening the dropdown applies the expected CSS variables consistently.

Written by the indexing model from the issue text.

Assessment

Tech stack
css, typescript
Domain
frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.