oddbird / oddbird/css-anchor-positioning
applying the polyfill to dynamic elements
- 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
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.
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