DaisyUI table and TailwindCSS table

Hello

with daisy ui + tailwind in the new 1.8 phoenix setup, looks like there is a clash for table


<table class="table">

triggers daisyui table but what if I want tailwindcss table ?

how to put a prefix for daisyui so that this clash would not arise ?

also how to use the previous

require(“@tailwindcss/forms”)

in the tailwind.config.js old file, for the new setup ?

thanks

Check the new app.css file:

triggers daisyui table but what if I want tailwindcss table ?

Tailwindcss doesn’t have a css class .table. Do you mean the table component that shipped in the old core_components.ex file? That one should continue to work.

tailwindcss 3.4 had a table class, but ok it’s no more in tailwindcss 4

nevertheless how would you put a prefix to daisy ui classes so that you prevent any possible clash ?

I have a bunch of input fields arranged in table and I cannot find back the former look after upgrade

I guess that’s because of @tailwind/forms plugin which I don’t know how to declare in the new setup

I found this link which might be of interest:

There still is a .table class in tailwind. It sets display: table though, which is the default for <table> elements anyways. No need to set that manually.

1 Like