Tailwind v4 with component libraries #17242
Unanswered
zZHorizonZz
asked this question in
Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, we are currently trying to migrate to Tailwind v4, but we are having issues with Tailwind applying base layer styles to our external component library material web components. The main issue is that it's applying padding: 0 and margin: 0 to some components in this library. We didn't have this issue when using Tailwind v3. We have figured that it comes down to preflight which is applying this:
We are using a monorepo where we have a component package which contains some components that are not implemented in the external library:
Css of our component library:
Then we have module/app package for basically each app (each app has it's own prefix as well and imports the components CSS):
Also the tailwind-config/theme looks something like this:
External component library uses constructed stylesheets.
If there is somebody who could help us shed some light on this, we would really appreciate any tips and help.
Beta Was this translation helpful? Give feedback.
All reactions