-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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: Only last color definition in theme override is applied #3168
Comments
Thank you @suburbanworrier
for reporting issues. It helps daisyUI a lot 💚
|
More than happy to put some effort in to resolve this but honestly I'd need pointing in the right direction. |
In config, it must be light: {
...require('daisyui/src/theming/themes')['light'],
- '--pc': '99% 0 0',
- '--ac': '100% 0 0',
+ 'primary-content': 'oklch(99% 0 0)',
+ 'accent-content': 'oklch(100% 0 0)',
}, Docs: https://daisyui.com/docs/themes/#-5 I know it can be confusing where to use color name like |
Many thanks for providing the answer 🙇 |
What version of daisyUI are you using?
v4.12.10
Which browsers are you seeing the problem on?
All browsers
Reproduction URL
https://play.tailwindcss.com/HPwAYbvcas?file=config
Describe your issue
Overriding one of the standard colors works fine by redefining the css var in tailwind.config.js
Overriding multiple colors introduces quirks with seemingly only the final var being honoured.
However in making the Tailwind Play file I noticed that it was possible to successfully override both the primary and secondary color but never all three of "primary", "secondary" and "accent".
I initially mocked this up in a Stackblitz at https://stackblitz.com/edit/daisyui-sveltekit-3ys4xm?file=tailwind.config.cjs where I've updated daisyUI to the latest version. Toggling the order of lines 17 & 18 in tailwind.config.cjs exposes the problem as I initially saw it.
Both of these showcase an issue I'm seeing in a larger SvelteKit project where I'm attempting to style button text color.
The text was updated successfully, but these errors were encountered: