Enable plugins to rename layer names #18294
Freymaurer
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Based on my comment on another discussion (link). For context, i am working on a component library using the new vite tailwind plugin.
If you export tailwind 4 css into a tailwind 3 project (even with prefix) it throws due to:
@layer base is used but no matching @tailwind base directive is present.
.The recommended workaround is to rename the layers as detailed here.
In my case this looks like this:
In addition to tailwind i use daisyui 5 (compatible with tailwind 4). Because of the daisyui plugin, the final .css file still contains references to
@layer base
resulting in@layer base is used but no matching @tailwind base directive is present
.I reported this as issue with a tailwind play link, but it seems that this issue cannot be adressed by the author of daisyui.
I quote:
I hope that you can provide a way for plugin provider to either customize layer names or to correctly propagate any name changes in the tailwind config to the plugins.
This issue currently forces me to update the css file by hand before publishing, so it is really annoying 😅
Thanks for your time, reading this!
Beta Was this translation helpful? Give feedback.
All reactions