Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
ylc6223 opened this issue Oct 18, 2024 · 2 comments
Closed

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

ylc6223 opened this issue Oct 18, 2024 · 2 comments

Comments

@ylc6223
Copy link

ylc6223 commented Oct 18, 2024

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

Copy link

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
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants