Skip to content

fix: add missing PostCSS config for Tailwind v4 CSS rendering#92

Open
Alexi5000 wants to merge 2 commits into
OpenKnots:mainfrom
Alexi5000:pr/fix-postcss-config
Open

fix: add missing PostCSS config for Tailwind v4 CSS rendering#92
Alexi5000 wants to merge 2 commits into
OpenKnots:mainfrom
Alexi5000:pr/fix-postcss-config

Conversation

@Alexi5000

Copy link
Copy Markdown
Contributor

Summary

  • Adds postcss.config.mjs with @tailwindcss/postcss plugin registration
  • Fixes the root cause of CSS not rendering in production web builds

Root Cause

The project uses Tailwind CSS v4 (@tailwindcss/postcss in devDependencies) and imports it via @import "tailwindcss" in app/globals.css. However, no PostCSS configuration file existed to register the plugin with Next.js.

Without this file, the @import "tailwindcss" directive is never processed — all Tailwind utility classes (flex, p-4, text-sm, etc.) are absent from the compiled CSS, resulting in completely unstyled HTML output as shown in #84.

Why this wasn't caught locally

pnpm dev with Turbopack may have a different CSS pipeline behavior that masks the issue. Production builds (pnpm build) and Vercel deployments rely on PostCSS processing, which requires the config file.

Test plan

  • pnpm build completes without CSS warnings
  • Visit the production URL — all terminal components render with correct dark theme and glassmorphic styling
  • Compare against the screenshot in [BUG] CSS NOT RENDERED IN WEB #84 to confirm the fix

Fixes #84

The project uses `@tailwindcss/postcss` (v4) and imports Tailwind via
`@import tailwindcss` in globals.css, but no PostCSS configuration
file existed to register the plugin. Without it, Next.js never
processes the Tailwind directives and all utility classes are absent
in production builds — resulting in completely unstyled output.

Fixes OpenKnots#84
@vercel

vercel Bot commented May 21, 2026

Copy link
Copy Markdown

@Alexi5000 is attempting to deploy a commit to the 0xBuns Team on Vercel.

A member of the Team first needs to authorize it.

Adds scripts/assert-tailwind-css.mjs and a verify:css npm script, wired
into CI after the build step. It scans the .next output for compiled
Tailwind utilities (.flex, .grid, .items-center, .p-4, .text-sm) and
fails if they are absent.

This guards the exact regression this PR fixes (OpenKnots#84): a missing
postcss.config.mjs lets `next build` succeed while silently emitting CSS
with no Tailwind utilities, leaving the UI unstyled. The build alone
does not catch this; the assertion does.
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.

[BUG] CSS NOT RENDERED IN WEB

1 participant