Skip to content

docs(foundations): add a page on CSS container queries#61

Merged
jdevalk merged 4 commits into
mainfrom
standards-scan/container-queries-2026-06-27
Jun 27, 2026
Merged

docs(foundations): add a page on CSS container queries#61
jdevalk merged 4 commits into
mainfrom
standards-scan/container-queries-2026-06-27

Conversation

@jdevalk

@jdevalk jdevalk commented Jun 27, 2026

Copy link
Copy Markdown
Owner

What

Adds a new spec page: CSS container queries under foundations.

Covers both halves of the feature:

  • Size queriescontainer-type / container-name + @container (min-width: …), so a component responds to the space its container gives it rather than the viewport.
  • Style queries@container style(--custom-prop: …), testing a container's computed custom properties.

Also:

  • Wires relatedSlugs both ways on three adjacent pages (anchor-positioning, css-containment, dynamic-viewport-units).
  • Adds the added changelog entry.
  • Regenerates the OG image for the page plus the four count-driven images (og-default, og/checklist, og/spec, og/spec/foundations).

Why now

Container queries are a notable gap in an otherwise comprehensive modern-CSS set (we already cover anchor positioning, scroll-driven animations, text-wrap, css-containment, dynamic viewport units). Style queries reached Baseline (newly available) in May 2026, which prompted the audit — and surfaced that size queries (Baseline widely available since February 2023) were never documented either.

Primary sources

Status

recommended — a modern, component-based site should style by container, not viewport, but the platform contract does not break without it. Not required.

Checks

  • npm run build passes; page renders and appears at the HTML route, the .md endpoint, and in /llms.txt.
  • npm run lint (0 errors; 1 pre-existing warning in an untouched file) and npm run format:check pass.

Opened as a draft for maintainer review per the daily standards-scan routine — not for auto-merge.

🤖 Generated with Claude Code

Documents container-type/@container size queries (CSS Containment
Module Level 3) and the newer style queries (CSS Conditional Rules
Module Level 5). Status: recommended — a modern site should style
components by their container, but the platform works without it.

Size container queries have been Baseline widely available since
February 2023; style queries reached Baseline newly available in
May 2026. Wires relatedSlugs on anchor-positioning, css-containment,
and dynamic-viewport-units; adds the changelog entry and OG images.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jun 27, 2026

Copy link
Copy Markdown

Deploying specification-website with  Cloudflare Pages  Cloudflare Pages

Latest commit: ed2c540
Status: ✅  Deploy successful!
Preview URL: https://32c9e147.specification-website.pages.dev
Branch Preview URL: https://standards-scan-container-que.specification-website.pages.dev

View logs

jdevalk and others added 3 commits June 27, 2026 13:34
…queries

'Baseline (widely available) since February 2023' conflated the newly-
available date (Feb 2023, Firefox 110 — last core engine) with widely-
available. Size queries became Baseline in Feb 2023 and are now widely
available; the style-query date (May 2026) was already correct.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
After merging main (the inert page, #60), the total page count is 152;
regenerate the count-driven og-default / checklist / spec images so they
reflect it.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@jdevalk jdevalk marked this pull request as ready for review June 27, 2026 11:35
@jdevalk

jdevalk commented Jun 27, 2026

Copy link
Copy Markdown
Owner Author

Reviewed and improved before merge:

  • Baseline wording. "size container queries have been Baseline (widely available) since February 2023" conflated newly available (Feb 2023, Firefox 110 — the last core engine) with widely available (which came ~2 years later). Reworded in both the page and the changelog. Verified via the MDN MCP server that the style-query date (May 2026, Firefox 151) was already correct.
  • OG images regenerated for 152 pages. Merged main (now carrying the inert page from docs(accessibility): add a page on the inert attribute #60), so the total-count-driven og-default / checklist / spec images were one short; regenerated them. Per-page and category images are byte-identical (deterministic generator).

Verified the CSS-WG / MDN sources, the MDN canonical @container path, the inline css-containment link, and the bidirectional relatedSlugs. The failing Internal links check is the known linkinator exit-13 flake, not a real broken link.

@jdevalk jdevalk merged commit 6a3842d into main Jun 27, 2026
7 of 8 checks passed
@jdevalk jdevalk deleted the standards-scan/container-queries-2026-06-27 branch June 27, 2026 11:37
jdevalk added a commit that referenced this pull request Jun 27, 2026
…lake (#62)

The links job shelled out to `npx linkinator`, whose CLI runs `await main()`
at the top level. On Node 22 the event loop can empty while that await is
still pending, aborting with exit 13 ("unsettled top-level await") after
fetching only `/` — a deterministic crash, not a broken link, that the
earlier retry-on-13 hardening (#58/#59) could not reliably paper over (it
still failed on PRs #60 and #61).

Replace the CLI with scripts/check-links.mjs, which drives linkinator's
LinkChecker class programmatically and resolves with `.then()`/process.exit
so our process can't hit the same foot-gun. Pin linkinator as a devDependency
for a stable version. Both jobs (internal --internal, external --config) use
it; the config's `skip` list maps to the API's `linksToSkip`.

Verified locally: builds, serves, and scans 1500 internal links (0 broken,
exit 0) with no exit-13 crash.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant