break-inside

Class Description

break-inside-auto

Allows auto page/column breaks inside an element.

CSS Rules

.break-inside-auto {
  break-inside: auto;
}

Usage

<element class="break-inside-auto" />

Responsive

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

<element class="md:break-inside-auto" />

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="break-inside-auto: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="break-inside-auto: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 break-inside-auto::before" />

<element class="content-after break-inside-auto::after" />
.break-inside-auto Allows auto page/column breaks inside an element.

break-inside-avoid

Avoids page/column breaks inside an element.

CSS Rules

.break-inside-avoid {
  break-inside: avoid;
}

Usage

<element class="break-inside-avoid" />

Responsive

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

<element class="md:break-inside-avoid" />

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="break-inside-avoid: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="break-inside-avoid: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 break-inside-avoid::before" />

<element class="content-after break-inside-avoid::after" />
.break-inside-avoid Avoids page/column breaks inside an element.

break-inside-avoid-page

Avoids page breaks inside an element.

CSS Rules

.break-inside-avoid-page {
  break-inside: avoid-page;
}

Usage

<element class="break-inside-avoid-page" />

Responsive

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

<element class="md:break-inside-avoid-page" />

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="break-inside-avoid-page: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="break-inside-avoid-page: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 break-inside-avoid-page::before" />

<element class="content-after break-inside-avoid-page::after" />
.break-inside-avoid-page Avoids page breaks inside an element.

break-inside-avoid-column

Avoids column breaks inside an element.

CSS Rules

.break-inside-avoid-column {
  break-inside: avoid-column;
}

Usage

<element class="break-inside-avoid-column" />

Responsive

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

<element class="md:break-inside-avoid-column" />

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="break-inside-avoid-column: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="break-inside-avoid-column: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 break-inside-avoid-column::before" />

<element class="content-after break-inside-avoid-column::after" />
.break-inside-avoid-column Avoids column breaks inside an element.