You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am working on a component library using tailwind 4 and daisyui 5. This created issues with the produced css if it is referenced in a project using tailwind 3, with the following error: @layer base is used but no matching @tailwind base directive is present.
As the library is intented to work just from the css file without any tailwind requirements i looked for a workaorund and found the following solution: tailwindlabs/tailwindcss#18123 (reply in thread)
I renamed all layers but still had @layer base in the generated css. This was due to daisyui using the layer to add variables. The referenced tailwind play link reproduces this issue.
Maybe it is possible to add a config option for this case?
Thanks in advance, let me know if i can somehow help to speed up the fix for this, as it is currently a major blocker.
The text was updated successfully, but these errors were encountered:
Thank you @Freymaurer
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.
I understand.
Unfortunately, it's not possible yet to use another layer name due to Tailwind CSS plugin API.
Tailwind CSS provides APIs like addBase, addComponents, addUtilities addBase always adds styles to Tailwind's predefined @layer base and addComponents, addUtilities always add styles to Tailwind's predefined @layer utilities.
If Tailwind provides more access regarding this behavior, we may be able to provide an option as well.
Reproduction URL (Required)
https://play.tailwindcss.com/z19vEIqURl?file=css
What version of daisyUI are you using?
v5.0.40
Which browsers are you seeing the problem on?
All browsers
Describe your issue
I am working on a component library using tailwind 4 and daisyui 5. This created issues with the produced css if it is referenced in a project using tailwind 3, with the following error:
@layer base is used but no matching @tailwind base directive is present.
As the library is intented to work just from the css file without any tailwind requirements i looked for a workaorund and found the following solution: tailwindlabs/tailwindcss#18123 (reply in thread)
I renamed all layers but still had
@layer base
in the generated css. This was due to daisyui using the layer to add variables. The referenced tailwind play link reproduces this issue.Maybe it is possible to add a config option for this case?
Thanks in advance, let me know if i can somehow help to speed up the fix for this, as it is currently a major blocker.
The text was updated successfully, but these errors were encountered: