ui icon indicating copy to clipboard operation
ui copied to clipboard

some of tailwind classes not working in react/vite

Open ezrnew opened this issue 1 year ago • 2 comments

Hey, I just copied the entire table from dataTable tutorial and thats how it looks like in my project: image

while it should look like this: image

I have no idea why some styles are missing, i already reinstalled all shadcn stuff with everything default, here are my configuration files on my main project:

image image image image image image image

The second screenshot is from newly created vite app and all the styles work there, all the configs are exactly the same on my main project and that new one, the only difference i think are some extra dependencies on main project. Any ideas what might be causing the issue?

ezrnew avatar Jan 26 '24 13:01 ezrnew

Hi @ezrnew, I just tried to replicate your issue but it works fine to me. I see that you're using emotion, maybe it's causing a conflict with Tailwind but I'm not sure. Can you share the affected repo?

dan5py avatar Jan 27 '24 15:01 dan5py

Hi @ezrnew, I just tried to replicate your issue but it works fine to me. I see that you're using emotion, maybe it's causing a conflict with Tailwind but I'm not sure. Can you share the affected repo?

Hey @dan5py, its on my company repo so I dont think I can. What do you mean by 'emotion'?

Okay I see, somehow i missed that i have such dependency installed. Though I removed it and reinstaled node_modules but nothing changed :/ So I guess its not a reason

ezrnew avatar Jan 27 '24 22:01 ezrnew

Okay just fixed it by copying identical DataTable component from working repo but i placed it next to App.tsx in folder structure, used it in App.tsx, and then switched back to use the previous table that hasnt been working before... I assume i might have had something fcked up in my cache maybe, because on my first shadcn installation on this project i have not configured it correctly?

ezrnew avatar Jan 29 '24 07:01 ezrnew