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: !important needed to override some styles in DaisyUI #3657

Closed
1 task
withden opened this issue Mar 12, 2025 · 2 comments
Closed
1 task

bug: !important needed to override some styles in DaisyUI #3657

withden opened this issue Mar 12, 2025 · 2 comments

Comments

@withden
Copy link
Contributor

withden commented Mar 12, 2025

In some cases, DaisyUI styles require important overrides, which can cause issues when customizing styles.

If you've faced similar issues where DaisyUI styles are difficult to override, please comment below with the class. We will add into this list

Bug List

  • Badge (badge badge-outline !border-base-300)
Copy link

Thank you @withden 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.

@PruthviPraj00
Copy link
Contributor

Hello @withden,

The reason for this is that in Tailwind V4, the addComponents function now places the CSS under @layer utilities.

Image

As for the DaisyUI style for badges, the border color of the outline badge uses the current text color. Instead of modifying the border, you should adjust the text color like this:

text-base-300

This issue will persist until Tailwind Labs decides to revert the changes. @saadeghi has also raised this issue in Tailwind:
tailwindlabs/tailwindcss#15045

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