Skip to content

refactor(website): Tailwind theme migration and component cleanup#53

Merged
andresilva-cc merged 2 commits intomainfrom
worktree-website-cleanup
Apr 5, 2026
Merged

refactor(website): Tailwind theme migration and component cleanup#53
andresilva-cc merged 2 commits intomainfrom
worktree-website-cleanup

Conversation

@andresilva-cc
Copy link
Copy Markdown
Contributor

Summary

Large-scale refactor of the Grafex website to properly use Tailwind's @theme tokens, extract reusable components, and eliminate inline style / arbitrary value leakage.

Tailwind theme

  • Reset built-in color/font/shadow palettes (--color-*: initial) so only design system tokens exist
  • Rename tokens to avoid double prefixes (bg-base, text-heading, border-edge, text-pink)
  • Add muted/alpha variants, shadow tokens, and font tokens

Component extraction

  • InlineCode — pink pill for inline code references (replaced 46 occurrences)
  • Callout — tip/warning/info boxes with colored left border (replaced 10 occurrences)
  • CodeBlock extended with label and collapsible props (replaced 50+ hand-rolled code blocks)
  • MarketingLayout — shared nav, mobile menu, footer, scroll handler for index + 404 (fixes 404 bug where nav was missing "Why Grafex" and "Examples" links)

Infrastructure

  • Add tailwind-merge via cn() helper (src/lib/cn.ts) for clean class overrides
  • Add typecheck script (astro check)

Bug fixes

  • Fix feature cards losing colored top border on hover (was wiped by hover:border-edge-strong)
  • Fix mobile CTA missing hover:brightness-110 effect
  • Fix h2 headings rendering at 14px due to InlineCode's hardcoded text-sm (cli.astro, api.astro, browser-setup.astro)
  • Fix race condition where <InlineCode> was wrongly used inside table cells, heading elements, and standalone terminal containers

Test plan

  • cd website && npx astro build — 10 pages built
  • cd website && npm run typecheck — 0 errors, 0 warnings
  • Root Vitest library suite unaffected — 327 tests still pass
  • Visual review of all pages — no regressions

…nents

- Reset Tailwind's built-in color/font/shadow palettes and define design system tokens
- Rename theme tokens to avoid double prefixes (bg-base, text-heading, border-edge)
- Migrate all pages from inline styles and var() to Tailwind utility classes
- Extract InlineCode, Callout components for repeated patterns
- Extend CodeBlock with label and collapsible variants, replace hand-rolled blocks
- Add tailwind-merge via cn() helper for clean class overrides
- Add typecheck script (astro check)
- Fix hover state bugs on feature cards and mobile CTA
- Fix h2 headings that rendered at 14px due to InlineCode text-sm override
…tyles

- Extract MarketingLayout.astro to share nav, mobile menu, footer, and scroll handler between index.astro and 404.astro
- Fix 404 page bug where nav was missing "Why Grafex" and "Examples" links
- Clean up hero demo inline styles, keeping only gradient, clamp(), and system-ui font inline
- Use aspect-[1200/630] Tailwind class instead of inline aspect-ratio on use-cases cards
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 5, 2026

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

Project Deployment Actions Updated (UTC)
grafex Ready Ready Preview, Comment Apr 5, 2026 4:52pm

@andresilva-cc andresilva-cc merged commit 52c180f into main Apr 5, 2026
5 checks passed
@andresilva-cc andresilva-cc deleted the worktree-website-cleanup branch April 5, 2026 16:54
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