Dev Helpers
← Back

Prevent a flex item from shrinking

Prevent a flex item from shrinking with Tailwind CSS 4 utilities. The preview uses precompiled styles.

Open this example in the interactive library

Source code

<div class="demo flex w-48 [&>:first-child]:w-32 [&>:first-child]:shrink-0">
  <span class="tile">One</span><span class="tile">Two</span
  ><span class="tile">Three</span>
</div>