Skip to content

feat(docs-site): swizzle DocCard, restyle to match LinkCard#2294

Merged
aaronlee777 merged 1 commit into
mainfrom
al/feat/docs-card-components
Jun 26, 2026
Merged

feat(docs-site): swizzle DocCard, restyle to match LinkCard#2294
aaronlee777 merged 1 commit into
mainfrom
al/feat/docs-card-components

Conversation

@aaronlee777

Copy link
Copy Markdown
Contributor

Summary

Swizzle `DocCard` and `DocCardList` from `@docusaurus/theme-classic` so we own the markup and the styling, then restyle the CSS modules to mirror the `LinkCard` look from #2102 (closed) — bringing those design choices into the components Docusaurus uses for ``.

Card styling

  • 16px radius, 2rem padding
  • Hairline 1px `#ebedf0` border, no shadow
  • Hover: border bumps to `#d0d3d8`
  • Dark mode: `rgba(255,255,255,0.03)` bg, `rgba(255,255,255,0.1)` border (hover to `0.22`)

Typography

  • Title: 1.25rem / 600 / `-0.01em` letter-spacing, `#1b1b1d` (white in dark)
  • Description: 0.95rem / line-height 1.6, `#525860` (white-65 in dark)

React structure of the swizzled components left unchanged. The existing Infima `row` + `col col--6` grid in `DocCardList` continues to drive layout — no extra grid added.

Heading tokens

Also bumps `--ifm-heading-color` to pure black in light mode and pure white in dark mode (was inheriting Infima's soft `#e3e3e3` on dark).

Test plan

  • Run `docs-site` dev server, open a page that uses `` (e.g. `docs/reference/company/hooks/index.mdx`). Cards should render with the new 16px radius / hairline border / clean typography in both light and dark mode.
  • Hover a card and confirm the border darkens in light / brightens in dark.
  • Open any docs page and confirm h1/h2/h3 render pure black on light and pure white on dark.

🤖 Generated with Claude Code

Swizzle DocCard and DocCardList from @docusaurus/theme-classic so we
can own the markup and styling. Restyle the CSS modules to mirror the
LinkCard look from #2102: 16px radius, 2rem padding, hairline border,
no shadow, hover bumps the border; title at 1.25rem / 600 / -0.01em
with dark text in light mode and white in dark mode; description at
0.95rem with line-height 1.6. React structure left unchanged; the
existing Infima row/col grid in DocCardList still drives layout.

Also bump heading tokens in custom.css to pure black in light mode
and pure white in dark mode (was inheriting Infima's soft #e3e3e3 on
dark).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@aaronlee777 aaronlee777 requested a review from a team as a code owner June 26, 2026 21:23
@aaronlee777 aaronlee777 enabled auto-merge June 26, 2026 21:24
@aaronlee777 aaronlee777 added this pull request to the merge queue Jun 26, 2026
Merged via the queue into main with commit f661296 Jun 26, 2026
29 checks passed
@aaronlee777 aaronlee777 deleted the al/feat/docs-card-components branch June 26, 2026 21:39
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.

2 participants