saadeghi / daisyui

๐ŸŒผ ๐ŸŒผ ๐ŸŒผ ๐ŸŒผ ๐ŸŒผ โ€ƒThe most popular, free and open-source Tailwind CSS component library
https://daisyui.com
MIT License
34.13k stars 1.3k forks source link

bug: using CSS Variable in tailwind.config.js not working #3238

Closed ylc6223 closed 1 month ago

ylc6223 commented 1 month ago

What version of daisyUI are you using?

^4.12.13

Which browsers are you seeing the problem on?

Chrome

Reproduction URL

https://stackblitz.com/edit/vitejs-vite-qtfuu9?file=src%2Fcomponents%2FHelloWorld.vue

Describe your issue

I tried to set css variable in tailwind.config.js, but it doesn't work. In this file,CSS style classname bg-primary background-color does not working

image

When I use a CSS variable, it doesn't work

image

What should I do to make it work? I want to use my own CSS variables in it

image image

I look forward to hearing from you,Thanks

github-actions[bot] commented 1 month ago

Thank you @ylc6223 for reporting issues. It helps daisyUI a lot ๐Ÿ’š
I'll be working on issues one by one. I will help with this one as soon as a I find a solution.
In the meantime providing more details and reproduction links would be helpful.

saadeghi commented 1 month ago

They are already CSS variables. See this table: https://daisyui.com/docs/colors/

Here's how you can use the CSS variables in runtime: https://unpkg.com/browse/daisyui@4.12.13/dist/themes.css

Color values are OKLCH

Let me know if you have any questions