oddbird / oddbird/css-anchor-positioning
Support `@container anchored(fallback: ...)` queries
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 493
- Forks
- 18
- Avg merge
- 12h 37m
- Merged PRs (30d)
- 5
Description
Since the polyfill already has everything wired up related to CSS Anchor Positioning, it would be "relatively easy" to add support for the anchored container queries to it?
That is part of v2 of the spec: https://www.w3.org/TR/css-anchor-position-2/#anchored-container-queries
Are there reasons why it's a bad idea to do it in this polyfill?
Something like
if (!CSS.supports('anchor-name: --a')) {
await polyfill(); // covers queries as part of its work
} else if (!CSS.supports('container-type', 'anchored')) {
await polyfillAnchoredContainerQueries(); // Chromium 125–142
}
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
Start by reviewing the existing CSS Anchor Positioning polyfill behind the CSS.supports('anchor-name: --a') check, then compare its coverage with the anchored container queries specification. Define the scope for @container anchored(fallback: ...) and the polyfillAnchoredContainerQueries() entry point; done means the supported Chromium range and fallback-query behavior are clearly specified and tested.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- css, typescript
- Domain
- frontend, web-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100