Replies: 5 comments 1 reply
{{title}}
{{editor}}'s edit
{{editor}}'s edit
-
|
I have the same problem, tailwind is so good and the preflight must be set, otherwise it won't work as expected. I really like Mantine UI and MUI Joy so for it to work, I'm picking manually what css should be in my global.css from preflight file here. Awaiting for better solution from community lol. |
Beta Was this translation helpful? Give feedback.
{{title}}
{{editor}}'s edit
{{editor}}'s edit
-
|
I am aware of the existing solutions which involves setting preflight to false under corePlugins, but doing that in my case breaks the template's layout. The template already uses tailwindcss deeply with extensions over its base preflight. PrepaidGiftBalance Mastercard |
Beta Was this translation helpful? Give feedback.
-
|
Yeah, it's a dilemma. You can't have everything ;) |
Beta Was this translation helpful? Give feedback.
{{title}}
{{editor}}'s edit
{{editor}}'s edit
-
|
I had same issue, I solved it by using Prefix and coreplugin-preflight. Below is my tailwind config. This will work. Note: if possible, Change buttons(Where you are using tailwind css) with anchor tag after adding this configuration. |
Beta Was this translation helpful? Give feedback.
{{title}}
{{editor}}'s edit
{{editor}}'s edit
-
|
A work around if needed.
tailwind.config.js
{
corePlugins: {
preflight: false,
},
important: "#__next",
}
button,
[type='button'],
[type='reset'],
[type='submit'] {
-webkit-appearance: button;
background-color: transparent;
background-image: none;
}
@import "./css-reset.css"; |
Beta Was this translation helpful? Give feedback.
{{title}}
-
I am building a project over a NextJS template which uses TailwindCSS. The thing is I want to use MUI components with it but when I tried adding a button I get the transparent button (unexpected behavior when using Tailwind, and MUI in NextJS Project (White Button error)).
I am aware of the existing solutions which involves setting preflight to false under corePlugins, but doing that in my case breaks the template's layout. The template already uses tailwindcss deeply with extensions over its base preflight. I did go through similar discussions but most of the solutions worked around removing the preflight or were not descriptive enough.
I want to know if there is any effective way to fix problems with MUI components while still not completely removing tailwind's preflight. If you can share examples of how you did it, that will be great.
(If you think there is any comparable react components library which will not conflict with tailwind's preflight please feel free to share.)
Beta Was this translation helpful? Give feedback.
All reactions