Tailwind not applying classes NextJS 14 | Tailwind v4 #17029
Replies: 3 comments 1 reply
-
Hey! Nothing that stands out to me from the three files you shared. Do you mind putting together a reproduction that we can run locally? |
Beta Was this translation helpful? Give feedback.
-
Oh, actually, remove this line this seems like it's a recursion? @theme inline {
--font-body: --var(font-body);
} Or maybe change it to: @theme inline {
--font-body: var(--font-body);
} |
Beta Was this translation helpful? Give feedback.
-
@first-andy had similar issue on our nextjs app router app and the fix was to add /** @type {import('tailwindcss').Config} */
export default {
plugins: {
'@tailwindcss/postcss': {},
// this is the actual fix
autoprefixer: {}
}
} Looks like |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
What version of Tailwind CSS are you using?
For example: v4.0.11
What build tool (or framework if it abstracts the build tool) are you using?
Next.js 14.0.2,
What version of Node.js are you using?
For example: v22.13.1
What operating system are you using?
macOS
Describe your issue
Since we upgraded to tailwind v4, our classes stopped working.
Tailwind loads in fine but classes are not applied..
We use the following postcss.config.mjs file:
This is our stylesheet:
/app/layout.jsx
Are we missing something here?? or is nextjs14 not compatible with tailwind v4?
Beta Was this translation helpful? Give feedback.
All reactions