Replies: 1 comment
-
While browsing the source code, I found out about the spacing configuration. The utility can then just use this config instead of the width/height values which include percentages and can result in unexpected behaviors |
Beta Was this translation helpful? Give feedback.
0 replies
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.
-
Hey 👋
So I often find myself using the
width
andheight
utility to create square-shaped elements, typically when using SVG icons or displaying profile pictures.As a lazy dev, I extended the default tailwind config to add a square/size (not sure about the name yet) utility class.
Turning this:
Into this:
While adding this utility to all of my current projects I taught that I could not be the only one that would enjoy having this by default in Tailwind.
Another thing is that it could either be defined as a core plugin, meaning we could change the configuration via the
tailwind.config.js
or use the values of the height/width (like I did in the snippet above)Beta Was this translation helpful? Give feedback.
All reactions