oddbird / oddbird/css-anchor-positioning

Can I load this in a custom-element, so it can access shadow-dom?

Open
#170 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Hi, really nice polyfill.

I would like the example which keeps the container in the viewport. I have 2 questions.
Does it work with shadowdom. I would like to use it for a custom dropdown component where the popup has to stay inside the window.

Second question is, I see the example constantly updating when it overlaps the border of the scrollable content. Wouldn't that make it slow. Is that a bug?

Screenshot 2024-04-22 at 11 30 53

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 example that keeps the container in the viewport and investigate its behavior inside a custom element with shadow DOM. Reproduce the reported updates when the popup overlaps scrollable content, then determine whether shadow DOM support and update frequency need documentation or a scoped change.

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
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.