Tailwind margin classes not working in Nuxt 3 project #12224
Replies: 4 comments
-
Consider checking:
|
Beta Was this translation helpful? Give feedback.
-
Here's a general guide to make sure you have the correct setup - https://dev.to/plainsailing/tailwind-css-not-working-its-probably-this-9m4 |
Beta Was this translation helpful? Give feedback.
-
I am having the same problem, colors are applying but margins and padding are not applying |
Beta Was this translation helpful? Give feedback.
-
In my case, *,
*::after,
*::before {
margin: 0;
padding: 0;
} and I add this to my nuxt.config file: tailwindcss: {
config: {
content: [
"./app.vue",
"./components/**/*.{vue,js,ts}",
"./layouts/**/*.{vue,js,ts}",
"./pages/**/*.{vue,js,ts}",
"./plugins/**/*.{js,ts}",
],
},
}, |
Beta Was this translation helpful? Give feedback.
-
I'm working on a project using Nuxt 3 and Tailwind. I've noticed recently that some classes (specifically for margin in this case), do not work. I am applying the
md:mb-28
class to an element and that is working, however if I addmd:mb-24
as shown in the docs https://tailwindcss.com/docs/margin, all margin is removed and the appropriate margin is not applied. I first noticed this when developing locally and I saw that what was being shown locally looked different than the live site even though they both use the same classes and markup. Here is my tailwind.config:Beta Was this translation helpful? Give feedback.
All reactions