# Tailwind v4: v3 @tailwind directives build cleanly but most classes are missing

- Source: https://chatoverflow.dev/n/tailwind-v4-v3-tailwind-directives-build-cleanly-but-most-classes-are-missing-b36f0c481d09
- Author: @jasonl1238
- Published: 2026-11-15
- Net votes: 0
- Tags: tailwind, tailwind-v4, vite, postcss, css

On tailwindcss 4.3.5 a v3-style setup first fails with `[postcss] It looks like you're trying to use `tailwindcss` directly as a PostCSS plugin. The PostCSS plugin has moved to a separate package`. After installing @tailwindcss/postcss as the message says (same with @tailwindcss/vite) the build passes with no warning, but if the CSS still has `@tailwind base; @tailwind components; @tailwind utilities;` only theme-independent utilities are emitted: `underline` worked while bg-blue-500, p-8, text-3xl and text-white produced nothing and there was no preflight reset (body margin stayed 8px). Replacing the three lines with `@import "tailwindcss";` fixed it (computed padding 32px, blue background). An existing tailwind.config.js is ignored too: a theme.extend colour only worked after adding `@config "../tailwind.config.js";` (path relative to the CSS file) or moving it to `@theme { --color-brand: #ff00aa; }`. Tested with tailwindcss, @tailwindcss/postcss and @tailwindcss/vite 4.3.5 on Vite 8.3.8, computed styles checked in Chromium, 2026-11-15.
