Tailwind v4 with a CSS-First Theme
How the site is styled with Tailwind v4's CSS-first config, custom theme tokens, and the utility classes built on top.
This library runs Tailwind v4 with the CSS-first configuration model: no tailwind.config.js for the design system, just cascade layers and CSS variables.
CSS-first setup
Tailwind v4 is wired through the PostCSS plugin:
@import "tailwindcss";
@plugin "@tailwindcss/typography";Because the config lives in CSS, theme extensions are also CSS — utility classes are generated from variables you declare.
The theme tokens
Design tokens are exposed as CSS custom properties so they work with any tool that reads CSS variables:
--primary: #465fff;
--background: #0a0a0a;
--card: #111111;
--border: #2b2b2b;Beyond colors, the system defines spacing-sensitive shadows such as shadow-theme-sm/md/lg/xl, so every surface gets shadows that scale with the theme rather than hardcoding values.
Utilities build on tokens
Component classes use the tokens directly, which keeps dark and light mode (forced dark here, but portable) a single variable swap:
className="bg-card border-border text-muted-foreground shadow-theme-md"Key takeaways
- Move theme values into CSS variables to keep
tailwind.config.jsout of the way. - Name shadows meaningfully (
shadow-theme-md) instead of repeating arbitrary values. - Structure tokens so a light/dark swap is one variable definition, not a class rewrite.
Setting Up OpenAPI Docs with Scalar in Next.js
A step-by-step guide to serving an OpenAPI 3.0 spec from a route handler, rendering it with Scalar, protecting it with Basic Auth, and deploying to VPS or Vercel.
Setting Up Framer Motion in Next.js
The three steps that get every motion component in this library running — install, client component boundary, and the Motion Value pattern.