Skip to content

docs: fix Cards — title before description, correct padding, equal-height grid - #23

Merged
damartinezjulio merged 2 commits into
mainfrom
fix/cards-title-order
Jul 12, 2026
Merged

docs: fix Cards — title before description, correct padding, equal-height grid#23
damartinezjulio merged 2 commits into
mainfrom
fix/cards-title-order

Conversation

@damartinezjulio

Copy link
Copy Markdown
Contributor

@Sigilix ignore
@coderabbitai ignore

Root cause: Nextra 3's Cards.Card renders children before the title span by design — that slot is intended for a preview image, not text. Our docs pass a description as children, so it landed above the title. Only the title span carried Nextra's _p-4, so the description sat flush to the card edge while the title was inset. The grid's --rows:3 auto-fill also wrapped a 4-card row as 3 + 1.

Fix: a source-level components/Cards.tsx that renders title → padded body, styled to match the existing .sig-feature-card exactly (same border, gradient, radius, hover), with an equal-height 2-col grid (1-col ≤640px). Fixed at the DOM level rather than with a CSS order trick, which would have left the description first for screen readers and SEO.

  • 57 Cards grids / 165 cards across 53 pages
  • 55 files changed — 1 new component, 1 CSS, 53 MDX import lines only (zero prose changed)
  • Build exit 0; 0 cards render body-before-title in the built output

…nd rows

Nextra 3's Cards.Card renders `children` BEFORE the title span — its children
slot is designed to hold a preview image, not text. Our docs pass a description
as children, so every "Read next" grid rendered description-above-title, with
the description flush to the card edge (only Nextra's title span carries p-4)
and a 3-up auto-fill grid that stranded a lone card on a second row.

Replace Nextra's Cards with components/Cards.tsx: title first, then a padded
body, one padding box on the card, and a 2-col stretch grid so rows stay flush
and equal-height. Visual style is unchanged (mirrors FeatureCards).

Only import lines changed in the MDX; no prose was touched.
@vercel

vercel Bot commented Jul 12, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
sigilix-docs Ready Ready Preview, Comment Jul 12, 2026 8:44am

Request Review

@damartinezjulio
damartinezjulio merged commit 0b903c8 into main Jul 12, 2026
6 checks passed
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