Skip to content

Some classes of tailwindcss are not working in next.js specially spacing classes #17235

Answered by wongjn
umair-sajjad asked this question in Help
Discussion options

You must be logged in to vote

It is happening because the following rule is removing the margin and padding:

* {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}

Consider removing this rule altogether. Preflight already has this CSS for you.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@umair-sajjad
Comment options

Answer selected by umair-sajjad
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants