About width: fit-content #2727
Replies: 9 comments 12 replies
-
Can try |
Beta Was this translation helpful? Give feedback.
-
You could also add the following to your theme? width: {
'fit-content': 'fit-content'
} |
Beta Was this translation helpful? Give feedback.
-
@adamwathan would love to see |
Beta Was this translation helpful? Give feedback.
-
Yep, would like to see this as well for both width and height. |
Beta Was this translation helpful? Give feedback.
-
If you have JIT enabled (available since v2.1), you can do |
Beta Was this translation helpful? Give feedback.
-
#5638 - I've made a PR to add fit-content to Tailwind |
Beta Was this translation helpful? Give feedback.
-
In some situations "max-w-prose" can handle. |
Beta Was this translation helpful? Give feedback.
-
Not sure how relevant this is, fairly new with TW. I just created a custom property in my tailwind.config file. Then I just added an
|
Beta Was this translation helpful? Give feedback.
-
Not sure when this was added, couldn't find it in the docs, but "w-fit" works for me. |
Beta Was this translation helpful? Give feedback.
-
Hello dear Tailwind community 👋
In my projects especially in a tags I need to use width: fit-content when I use display: block because I want to have a tag with smallest width possible, so to make it happen I use width: fit-content. In pure CSS is there another way to do that? If not we should add it to Tailwind.
Thanks 🙂
Beta Was this translation helpful? Give feedback.
All reactions