Some classes of tailwindcss are not working in next.js specially spacing classes #17235
Answered
by
wongjn
umair-sajjad
asked this question in
Help
-
Some classes of tailwindcss are not working in next.js specially spacing classes.
postcss.config.mjs:
global.css:
Kindly tell me why this is happening and what is solution? |
Beta Was this translation helpful? Give feedback.
Answered by
wongjn
Mar 16, 2025
Replies: 1 comment 1 reply
-
It is happening because the following rule is removing the * {
box-sizing: border-box;
padding: 0;
margin: 0;
} Consider removing this rule altogether. Preflight already has this CSS for you. |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
umair-sajjad
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It is happening because the following rule is removing the
margin
andpadding
:Consider removing this rule altogether. Preflight already has this CSS for you.