issues with Tailwind CSS Spacing in Next.js 15 (Missing Classes in globals.css) #16769
-
What version of Tailwind CSS are you using? What build tool (or framework if it abstracts the build tool) are you using? What version of Node.js are you using? What browser are you using? What operating system are you using? Describe your issue I recently installed Next.js 15 and Tailwind CSS (Tailwind 3.4). After that, I installed ShadCN normally (without using the Canary version) since I'm still using Tailwind 3.4. However, I encountered an issue where some Tailwind classes do not apply correctly. For example, when I use py-4, there is no spacing, but py-2 works fine. After investigating, I noticed that not all Tailwind CSS classes are included in globals.css in Next.js 15. Has anyone experienced this issue? How can I fix it and ensure that all Tailwind classes work as expected in Next.js 15? here is if i using py-4 : Py-4 Here is if using py-2 : Py-2 not just padding, font colors too, gap too |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hey! Do you have a repro of the issue? I suggest auditing your content configuration to see if the files using these utilities are set up correctly. |
Beta Was this translation helpful? Give feedback.
-
i forgot to configure tailwind.config.ts |
Beta Was this translation helpful? Give feedback.
Hey! Do you have a repro of the issue? I suggest auditing your content configuration to see if the files using these utilities are set up correctly.