marcj/css-element-queries
CSS Element-Queries aka Container Queries. High-speed element dimension/media queries in valid css. observed · 2026-08-28
Health v2 · maintenance only
23/100
- Activity 0
- Release rhythm 8
- Longevity 100
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-03. Adoption (stars, forks) is never an input.
- gap_med: n/a
- age_days: 4841
- days_rel: n/a
- days_push: 1071
- n_releases_24m: 0
Adoption not part of the score
4243 stars · 476 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-29, confidence not recorded
A JavaScript polyfill that adds element-based media queries (container queries) to browsers, letting CSS rules respond to an element's dimensions rather than the window viewport. It uses an event-based ResizeSensor for high performance with valid CSS attribute selector syntax.
Use cases
- make widgets responsive to their container size instead of the viewport
- polyfill container queries in older browsers
- build responsive web components
- serve responsive images based on element width without FOUC
- detect element size changes from CSS transitions, hover states, or DOM mutations
When to choose
- you need element-level responsiveness in browsers lacking native container query support
- you want a framework-agnostic, valid-CSS-syntax solution
- you need to support legacy browsers like IE10+
When to avoid
- your target browsers support native CSS container queries (@container)
- you need a modern, actively maintained solution
- you only need viewport-based media queries
Facets
library · maturity maintenance
ui-components css-framework frontend web-development web-design browser container-queries polyfill responsive-design resize-sensor element-queries javascript
3 sources
- readme: https://github.com/marcj/css-element-queries · fetched 2026-08-28 · 99b3a68aa1ce
- homepage: http://marcj.github.io/css-element-queries/ · fetched 2026-08-29 · fcc3a85bba53
- registry_npm: https://registry.npmjs.org/css-element-queries · fetched 2026-08-29 · 3c1bdfbfacd7
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| marcj/css-element-queries | main | 23 |
For agents
markdown · JSON · MCP: product_card(name="marcj/css-element-queries")
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem