tailwind icon indicating copy to clipboard operation
tailwind copied to clipboard

Plugins works just fine out of the box

Open thiagomajesk opened this issue 1 year ago • 5 comments

Hi! I found it curious that we have the following warning in the README:

Note: The stand-alone Tailwind client bundles first-class Tailwind packages within the precompiled executable. For third-party Tailwind plugin support (e.g. DaisyUI), the node package must be used

I might be reading this wrong, but the README seems to suggest that the node version of Tailwind is required for third-party plugin support, which doesn't seem to be the case (to be honest, I'm not sure if this was ever the case, since Phoenix used to ship with plugins to handle things like phx-no-feedback and phx-click-loading)

The PR that changed the README also doesn't go into detail on why this warning was added to begin with. Anyway, I've been using Daisy UI and other plugins for quite a while now, and it just works, so my question is, should we just remove this to avoid confusion?

thiagomajesk avatar Nov 23 '24 21:11 thiagomajesk

Maybe something like this instead?

_Note_: The stand-alone Tailwind client bundles first-class Tailwind packages
within the precompiled executable. For third-party Tailwind plugin support (e.g. DaisyUI),
those must be installed using your Node.js package manager of choice in the directory where Tailwind is
executed from. For example: `npm install daisyui --save`.

SteffenDE avatar Feb 03 '25 12:02 SteffenDE

@SteffenDE At this point, I would just remove the note to avoid confusion. I feel like teaching how to use a package manager is not really that helpful for a couple of reasons:

The Tailwind V3 docs already have a page that is dedicated to this: https://v3.tailwindcss.com/docs/plugins. Also, it looks like for V4 things have changed a lot (Vite vs Postcss; JS vs CSS), so it might be more useful to be agnostic and refer directly to the docs of the version and plugin in question. WDYT?

thiagomajesk avatar Feb 03 '25 13:02 thiagomajesk

FWIW daisyui does not work out of the box.

For some reason it only imports some of the classes

benbot avatar Mar 21 '25 23:03 benbot

Ah, no never mind. tailwind just changed how the configuration worked, so it wasn't picking up all the classes being used in my templates.

benbot avatar Mar 22 '25 01:03 benbot

When it comes to Tailwind, it's almost always the configuration @benbot 😅. FWIW, I've used Tailwind 3 with DaisyUI 4 and recently migrated to Tailwind 4 with DaisyUI 5 and it works just fine, no additional configuration is needed 👍.

thiagomajesk avatar Mar 22 '25 12:03 thiagomajesk