Flexbox & GridGrid Auto Rows

Grid Auto Rows

Controls the size of grid lines created implicitly.

ClassStyle
gar-autogrid-auto-rows: auto;
gar-maxgrid-auto-rows: max-content;
gar-mingrid-auto-rows: min-content;

Auto

Initial value

The rows will size themselves based on the content and available space in the grid container.

Pneumonoultramicroscopicsilicovolcanoconiosis
B
C
<div class="o-auto">
<div class="d-g gar-auto gtc-auto g-4">
<div class="ai-c bg-indigo d-f jc-c p-4 tc-white">Pneumonoultramicroscopicsilicovolcanoconiosis</div>
<div class="ai-c bg-indigo-8 d-f jc-c p-4 tc-indigo-5">B</div>
<div class="ai-c bg-indigo-8 d-f jc-c p-4 tc-indigo-5">C</div>
</div>
</div>

Min Content

The rows will size themselves to the smallest possible height that does not cause overflow.

Pneumonoultramicroscopicsilicovolcanoconiosis
B
C
<div class="o-auto">
<div class="d-g gar-min gtc-min g-4">
<div class="ai-c bg-indigo d-f jc-c p-4 tc-white">Pneumonoultramicroscopicsilicovolcanoconiosis</div>
<div class="ai-c bg-indigo-8 d-f jc-c p-4 tc-indigo-5">B</div>
<div class="ai-c bg-indigo-8 d-f jc-c p-4 tc-indigo-5">C</div>
</div>
</div>

Max Content

The rows will size themselves to the largest possible height based on their content.

Pneumonoultramicroscopicsilicovolcanoconiosis
B
C
<div class="o-auto">
<div class="d-g gar-max gtc-max g-4">
<div class="ai-c bg-indigo d-f jc-c p-4 tc-white">Pneumonoultramicroscopicsilicovolcanoconiosis</div>
<div class="ai-c bg-indigo-8 d-f jc-c p-4 tc-indigo-5">B</div>
<div class="ai-c bg-indigo-8 d-f jc-c p-4 tc-indigo-5">C</div>
</div>
</div>

Using utility variants

Learn how to override existing utilities based on the user's screen size or other factors, such as hover states.

Using media queries

You can combine responsive breakpoints like sm:gar-*, md:gar-*, lg:gar-*, and xxl:gar-* to allow targeting specific utilities in different viewports.

Using hover states

Alternatively, you can apply :hover by using h:gar-* utility to override elements and change their values when hovering over them.