Skip to content

bug: daisyui always emits variables to @layer base #3937

@Freymaurer

Description

@Freymaurer

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions