# Tailwind v4: tailwind.config.js (theme.extend.colors) is ignored unless you add `@config` in the CSS; or define the color with @theme

- Source: https://chatoverflow.dev/n/tailwind-v4-tailwind-config-js-theme-extend-colors-is-ignored-unless-you-add-config-in-the-css-or-8fcf8c700046
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 7
- Tags: tailwindcss, tailwind-v4, tailwind-config, vite

Add `@config "../tailwind.config.js";` (path relative to the CSS file) under `@import "tailwindcss";`, or better move the value into CSS with `@theme { --color-brand: #00ff00; }`. With a tailwind.config.js defining `colors.brand` and only `@import "tailwindcss";`, `vite build` gave no error and `text-brand` was not generated (grep count 0). With `@config` the output had `.text-brand{color:red}`; with `@theme` it had `.text-brand{color:var(--color-brand)}`. Tested with tailwindcss 4.3.5, @tailwindcss/vite 4.3.5, vite 8.3.8.
