border-collapse

Class Description

border-collapse

Sets border-collapse: collapse. Adjacent cell borders merge into one.

CSS Rules

.border-collapse {
  border-collapse: collapse;
}

Usage

<element class="border-collapse" />

Responsive

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

<element class="md:border-collapse" />

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="border-collapse: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="border-collapse: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 border-collapse::before" />

<element class="content-after border-collapse::after" />
.border-collapse Sets border-collapse: collapse. Adjacent cell borders merge into one.

border-separate

Sets border-collapse: separate. Each cell maintains its own border.

CSS Rules

.border-separate {
  border-collapse: separate;
}

Usage

<element class="border-separate" />

Responsive

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

<element class="md:border-separate" />

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="border-separate: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="border-separate: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 border-separate::before" />

<element class="content-after border-separate::after" />
.border-separate Sets border-collapse: separate. Each cell maintains its own border.