-
-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] size is not always equivalent to h- and w- #315
Comments
@bodograumann thank you for reporting this issue. I made a basic test on Tailwind Play https://play.tailwindcss.com/PS0lBwtsJc In the test the config I use has the same value for the
Yet, the I'll work on it soon, for now you can simply disable the entire rule or just specific lines where it is needed. |
Please try it via |
Thanks for looking at this so quickly, @francoismassart . It is a bit too conservative though, I feel. There are some values allowed for |
I thought (reading their doc) that it was only based on the But I can see a dedicated entry in the config for I'll release a new beta later today |
@bodograumann Please try this beta version:
and give me feedbacks. |
Yes, now it works for
I mean it is an edge case, that someone decides to define a |
@bodograumann please take the time to configure this edge case inside a Tailwind Play and share its URL so that I can test it out. |
Here you go: https://play.tailwindcss.com/XPnP68FJ85 |
@bodograumann => |
Fixed in the latest release |
Thanks for all your effort! |
Does anyone have this problem: after eslint converts all to size, somehow tailwind does not build into CSS this size- class so my UI is all broken because of lacking width and height. So I have to manually convert all size- back to h- and w- |
@nguyenleccss361 for now disable the enforce shorthand rule. And if you want me to take a look at it, share a minimal project exposing the issue. |
Describe the bug
While in general it is a good idea to use
size-
instead ofh-
andw-
, 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:
class="h-dialog w-dialog"
. This works as intended.class="size-dialog"
.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):
The text was updated successfully, but these errors were encountered: