Skip to content

Shadcn: migrate the docs pages to Tailwind and shadcn - #747

Open
hdprajwal wants to merge 2 commits into
shadcn-badge-spinnerfrom
shadcn-about-pages
Open

Shadcn: migrate the docs pages to Tailwind and shadcn#747
hdprajwal wants to merge 2 commits into
shadcn-badge-spinnerfrom
shadcn-about-pages

Conversation

@hdprajwal

Copy link
Copy Markdown
Contributor

Stacked on #746.

Rebuilds the /about page family on Tailwind utilities and shadcn components. Every inline style in pages/docs and widgets/docs is gone, except ColorSwatch's background, which stays dynamic because it paints whichever variable it documents.

Pages covered

/about, /team, /privacy-policy, /terms-of-use, /data-coverage, /data-sources, /code-style — all now render zero inline styles, no legacy .css imports, and no raw HTML with a shadcn equivalent.

Notable changes

  • DocsCard is now a shadcn Card. The old component had no card chrome at all — just padding and a flex column — so both the navigation tiles and the prose sections gain a background and a ring. This is the largest visual change in the PR.
  • The component example table in LinkComponents is now a shadcn Table.
  • DocsCardGrid had gap: -0.5em 0. A negative gap is invalid CSS and was dropped by the browser, so the grid had no gap at all. It now has a real one.
  • InternalLink accepts a className, so a linked DocsCard can be styled without falling back to inline styles. Additive — style still works for its other callers.
  • The Data Coverage table breaks out of the 800px prose column from 2xl up, so it centers rather than overflowing to the right. Below that breakpoint it stays in the column and scrolls horizontally.

Second commit is separable

Shadcn: use a grayscale foreground instead of navy changes --foreground and its card/popover/secondary/accent/sidebar variants from #04355c to #171717 (neutral-900), matching the neutral baseColor already in components.json. Dark mode already used #f1f1f1 and is unchanged.

This one is global, not scoped to the docs pages — it affects every page and will move every screenshot baseline. It is a separate commit so it can be reviewed or dropped on its own.

Deliberately out of scope

The components demoed on /code-styleHoverable, HoverableButton, ModalButton, PopupCard, Selector — are untouched and still render as legacy inside the examples. Same for FieldCoverageTable on /data-coverage; only the page shell around it changed. Those belong to later layers.

ColorStyles still documents the legacy --color-* bridge variables, which are scheduled for deletion. Updating that list is a content change rather than a styling one, so it is left for a follow-up.

Screenshot baselines will need regenerating.

Rebuild the /about page family on Tailwind utilities and shadcn
components. Every inline style in pages/docs and widgets/docs is gone
except ColorSwatch's background, which stays dynamic because it paints
whichever variable it documents.

- DocsCard is now a shadcn Card. The old component had no card chrome at
  all, so both the navigation tiles and the prose sections gain a
  background and a ring.
- The component example table in LinkComponents is now a shadcn Table.
- DocsCardGrid had `gap: -0.5em 0`. A negative gap is invalid CSS and was
  dropped by the browser, so the grid had no gap; it now has a real one.
- InternalLink accepts a className, so a linked DocsCard can be styled
  without falling back to inline styles. Additive: style still works.
- The Data Coverage table breaks out of the 800px prose column from 2xl
  up, so it centers instead of overflowing to the right. Below that it
  stays in the column and scrolls horizontally.

The components demoed on /code-style (Hoverable, Modal, PopupCard,
Selector) are deliberately untouched; they belong to later layers.
--foreground and its card, popover, secondary, accent and sidebar
variants were #04355c, a dark navy that gave all body text a blue cast.
They now use #171717 (neutral-900), matching the neutral baseColor
already set in components.json. Contrast against white is about 17:1.

Dark mode already used #f1f1f1 and is unchanged.

This is a global theme change rather than one scoped to the docs pages,
so it affects every page and will move every screenshot baseline.
@hdprajwal
hdprajwal requested a review from a team as a code owner August 6, 2026 13:16
@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Cloudflare Pages preview

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