-
-
Notifications
You must be signed in to change notification settings - Fork 169
Description
What version of prettier-plugin-tailwindcss
are you using?
What version of Tailwind CSS are you using?
What version of Node.js are you using?
What package manager are you using?
npm
What operating system are you using?
Linux (Docker)
Reproduction URL
saadeghi/daisyui#2124 (reply in thread)
I can provide a public Reproduction URL, however the maintainer of DaisyUI @saadeghi confirms the same issue.
If it's still required, I'm happy to provide one. :)
Describe your issue
The problem is the invalid sorting of DaisyUI (or any other framework I tried) custom classes.
Result:
<div class="card-compact card rounded-none p-3"/>
<div class="menu-compact menu m-1"/>
<button type="button" class="btn-secondary btn h-6 w-6" />
Expected:
<div class="card card-compact rounded-none p-3"/>
<div class="menu menu-compact m-1"/>
<button type="button" class="btn btn-secondary h-6 w-6" />
I cannot find any configuration options to solve this. I've tried multiple packages, including https://github.com/francoismassart/eslint-plugin-tailwindcss, also different options, but it all results incorrect ordering of classes.
I do understand this package is used to sort Tailwind classes, however it would be nice if it could understand sub classes, e.g. menu-*
after menu
. Or sort Tailwind classes, and leave unknown classes in the provided order. :)
Please let me know if you need more info.
Thanks.