saadeghi / daisyui

🌼 🌼 🌼 🌼 🌼  The most popular, free and open-source Tailwind CSS component library
https://daisyui.com
MIT License
34.11k stars 1.3k forks source link

Colors not correctly auto-installed for Windicss #197

Closed marshallswain closed 2 years ago

marshallswain commented 3 years ago

The Daisy colors aren't getting auto-installed by calling transform('daisyui'). As a workaround, I can do the following:

import daisyColors from 'daisyui/colors/index.js'

export default defineConfig({
   theme: {
      extend: {
         colors: {
            ...daisyColors
         }
      }
   }
})

Note that I don't have o install the colors/windi file to get the colors to work.

I've tried to debug what's going on. I was able to verify that the isTailwindInstalled !== false code at the bottom of index.js runs. I couldn't do any further debugging tonight.

saadeghi commented 3 years ago

Thanks for the workaround @marshallswain πŸ‘
Honestly Windi has been a huge problem for me. Their transform API is super-buggy and never works as intended to transform plugins πŸ₯² I'm so tired of opening new issues there...

If this workaround does the job, I can replace this in daisyUI docs πŸ€·β€β™‚οΈ

marshallswain commented 3 years ago

This has been my experience as well. Their plug-in API is great, but is buggy when transforming tailwind-intended plugins.

I intend to explore the components more this weekend to see what doesn't work, but initial support is looking good with this workaround.

softgripper commented 3 years ago

Related to this: I tried using Windi with daisyui - and some hover states are weird - even after the colours workaround.

image

This is the html from the daisyui site, and the light theme selected - powered by Windi. The "change theme" button should not be this colour.

Tailwind works correctly here.

saadeghi commented 2 years ago

I would suggest using Tailwind 3 instead. It's faster and JIT mode is enabled by default. I think I should close this because Windi's transform function is not behaving as expected and I can't do anything about it πŸ€·β€β™‚οΈ