-
-
Notifications
You must be signed in to change notification settings - Fork 107
Closed
Labels
bugSomething isn't workingSomething isn't workingfeedback neededgood first issueGood for newcomersGood for newcomerswork in progress
Description
Describe the bug
While in general it is a good idea to use size- instead of h- and w-, those two definitions are not the same in all situations.
In particular if the selected tokens do not com from the spacing scale, the same names can mean different things.
It could also happen, that the size- utility does not exist at all.
To Reproduce
Steps to reproduce the behavior:
- Define the following tailwind settings:
export default { theme: { width: { dialog: "26rem" }, height: { dialog: "30rem" } } };
- Use the tokens like this:
class="h-dialog w-dialog". This works as intended. - Run eslint autofixes with tailwindcss-plugin installed. This replaces the above with
class="size-dialog". - The
size-dialogclass does not actually exist, becausedialogdoes not exist in thespacingnor in thesizescale. In fact the area is not even square.
Expected behavior
Ideally the linting rules would detect, that the two variants are not equivalent and not suggest the replacement.
Environment (please complete the following information):
- OS: Arch Linux
- Softwares + version used:
- eslint-plugin-tailwindcss@3.14.1
- tailwindcss@3.4.1
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingfeedback neededgood first issueGood for newcomersGood for newcomerswork in progress