Go back Tailwind CSS, HTML & CSS

width

.w-fit


<div class="w-fit></div>
css
width: fit-content 

"Use the space you can (available) but never less than your min-content and never more than your max-content"

  • https://developer.mozilla.org/en-US/docs/Web/CSS/fit-content
  • https://stackoverflow.com/a/58331628/473040