grid-auto-columns

Class Description

auto-rows

Sets implicit grid row sizing with an arbitrary grid-auto-rows value.

CSS Rules

.auto-rows {
  grid-auto-rows: var(--auto-rows);
}

Usage

The .auto-rows class is flagged as a value-driven selector. The variable --auto-rows is required.
<element class="auto-rows" style="--auto-rows: /* value */;" />

Responsive

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

<element class="md:auto-rows" style="--md-auto-rows: /* value */;" />

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="auto-rows:hover" style="--auto-rows-hover: /* value */;" />

Group Hover Example

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

<element class="group">
  <element class="auto-rows: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 auto-rows::before" style="--auto-rows-before: /* value */;" />

<element class="content-after auto-rows::after" style="--auto-rows-after: /* value */;" />

Shorthand

Value-driven classes support a shorthand syntax like bg=pink or p=4. The runtime processes this for you. Unlike :hover that is generating CSS on the fly, shorthand only splits it and appends the corresponding style.

<!-- Input -->
<element class="auto-rows=value" />

<!-- Output -->
<element class="auto-rows" style="--auto-rows: value;" />

CLS Alert

This feature may cause CLS (Cumulative Layout Shift). Make sure to include a z-not-ready class in your <head> tag.

.auto-rows Sets implicit grid row sizing with an arbitrary grid-auto-rows value.

auto-rows-auto

Sizes implicit grid rows by their natural content size.

CSS Rules

.auto-rows-auto {
  grid-auto-rows: auto;
}

Usage

<element class="auto-rows-auto" />

Responsive

Prefix .auto-rows-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:auto-rows-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="auto-rows-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="auto-rows-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 auto-rows-auto::before" />

<element class="content-after auto-rows-auto::after" />
.auto-rows-auto Sizes implicit grid rows by their natural content size.

auto-rows-fr

Distributes implicit grid rows evenly using fractional 1fr tracks.

CSS Rules

.auto-rows-fr {
  grid-auto-rows: minmax(0, 1fr);
}

Usage

<element class="auto-rows-fr" />

Responsive

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

<element class="md:auto-rows-fr" />

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="auto-rows-fr: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="auto-rows-fr: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 auto-rows-fr::before" />

<element class="content-after auto-rows-fr::after" />
.auto-rows-fr Distributes implicit grid rows evenly using fractional 1fr tracks.

auto-rows-max

Sizes implicit grid rows to their maximum content size.

CSS Rules

.auto-rows-max {
  grid-auto-rows: max-content;
}

Usage

<element class="auto-rows-max" />

Responsive

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

<element class="md:auto-rows-max" />

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="auto-rows-max: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="auto-rows-max: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 auto-rows-max::before" />

<element class="content-after auto-rows-max::after" />
.auto-rows-max Sizes implicit grid rows to their maximum content size.

auto-rows-min

Sizes implicit grid rows to their minimum content size.

CSS Rules

.auto-rows-min {
  grid-auto-rows: min-content;
}

Usage

<element class="auto-rows-min" />

Responsive

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

<element class="md:auto-rows-min" />

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="auto-rows-min: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="auto-rows-min: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 auto-rows-min::before" />

<element class="content-after auto-rows-min::after" />
.auto-rows-min Sizes implicit grid rows to their minimum content size.