Flex
Utilities for controlling how flex items both grow and shrink
Class reference
Initial
Use .flex-initial
to allow a flex item to shrink but not grow, taking into account its initial size:
Flex 1
Use .flex-1
to allow a flex item to grow and shrink as needed, ignoring its initial size:
Auto
Use .flex-auto
to allow a flex item to grow and shrink, taking into account its initial size:
None
Use .flex-none
to prevent a flex item from growing or shrinking:
Responsive
To control how a flex item both grows and shrinks at a specific breakpoint, add a {screen}:
prefix to any existing utility class. For example, use md:flex-1
to apply the flex-1
utility at only medium screen sizes and above.
<div class="flex ...">
<!-- ... -->
<div class="flex-none **md:flex-1** ...">
Responsive flex item
</div>
<!-- ... -->
</div>
For more information about Elements’ responsive design features, check out the Responsive Design documentation.
On this Page
v1.13.5