flex-wrap

Class Description

flex-wrap

Sets flex-wrap: wrap. Items wrap to the next line.

CSS Rules

.flex-wrap {
  flex-wrap: wrap;
}

Usage

<element class="flex-wrap" />

Responsive

Prefix .flex-wrap utility with a breakpoint variant (e.g., md:) to apply styles at specific screen sizes (Supported breakpoints are xm through 2xl).

<element class="md:flex-wrap" />

States

States are generated dynamically at runtime and always come last. Append a state like :hover or :focus to the end of the class. This works in conjunction with breakpoints .

Supported pseudo-classes: :hover, :active, :focus, :focus-visible, :focus-within, :target, :checked, :disabled, and :group-hover.

<element class="flex-wrap:hover" />

Group Hover Example

The :group-hover state applies styles when a parent element with the .group class is hovered.

<element class="group">
  <element class="flex-wrap:group-hover">...</element>
</element>

Pseudo-Elements

The ::before and ::after utility classes are supported too. Granted that you add the mandatory content-before or content-after class in order for them to work.

<element class="content-before flex-wrap::before" />

<element class="content-after flex-wrap::after" />
.flex-wrap Sets flex-wrap: wrap. Items wrap to the next line.

flex-wrap-reverse

Allows flex items to wrap onto multiple lines in reverse order.

CSS Rules

.flex-wrap-reverse {
  flex-wrap: wrap-reverse;
}

Usage

<element class="flex-wrap-reverse" />

Responsive

Prefix .flex-wrap-reverse utility with a breakpoint variant (e.g., md:) to apply styles at specific screen sizes (Supported breakpoints are xm through 2xl).

<element class="md:flex-wrap-reverse" />

States

States are generated dynamically at runtime and always come last. Append a state like :hover or :focus to the end of the class. This works in conjunction with breakpoints .

Supported pseudo-classes: :hover, :active, :focus, :focus-visible, :focus-within, :target, :checked, :disabled, and :group-hover.

<element class="flex-wrap-reverse:hover" />

Group Hover Example

The :group-hover state applies styles when a parent element with the .group class is hovered.

<element class="group">
  <element class="flex-wrap-reverse:group-hover">...</element>
</element>

Pseudo-Elements

The ::before and ::after utility classes are supported too. Granted that you add the mandatory content-before or content-after class in order for them to work.

<element class="content-before flex-wrap-reverse::before" />

<element class="content-after flex-wrap-reverse::after" />
.flex-wrap-reverse Allows flex items to wrap onto multiple lines in reverse order.

flex-nowrap

Sets flex-wrap: nowrap. Items remain on one line.

CSS Rules

.flex-nowrap {
  flex-wrap: nowrap;
}

Usage

<element class="flex-nowrap" />

Responsive

Prefix .flex-nowrap utility with a breakpoint variant (e.g., md:) to apply styles at specific screen sizes (Supported breakpoints are xm through 2xl).

<element class="md:flex-nowrap" />

States

States are generated dynamically at runtime and always come last. Append a state like :hover or :focus to the end of the class. This works in conjunction with breakpoints .

Supported pseudo-classes: :hover, :active, :focus, :focus-visible, :focus-within, :target, :checked, :disabled, and :group-hover.

<element class="flex-nowrap:hover" />

Group Hover Example

The :group-hover state applies styles when a parent element with the .group class is hovered.

<element class="group">
  <element class="flex-nowrap:group-hover">...</element>
</element>

Pseudo-Elements

The ::before and ::after utility classes are supported too. Granted that you add the mandatory content-before or content-after class in order for them to work.

<element class="content-before flex-nowrap::before" />

<element class="content-after flex-nowrap::after" />
.flex-nowrap Sets flex-wrap: nowrap. Items remain on one line.