Closed
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-dialog
class does not actually exist, becausedialog
does not exist in thespacing
nor in thesize
scale. 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: