Grid Auto Rows
Controls the size of grid lines created implicitly.
Widely available
This feature is well established and works across many devices and browser versions.
| Class | Style |
|---|---|
gar-auto | grid-auto-rows: auto; |
gar-max | grid-auto-rows: max-content; |
gar-min | grid-auto-rows: min-content; |
Auto
Initial value
The rows will size themselves based on the content and available space in the grid container.
<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 c-white">Pneumonoultramicroscopicsilicovolcanoconiosis</div> <div class="ai-c bg-indigo-8 d-f jc-c p-4 c-indigo-5">B</div> <div class="ai-c bg-indigo-8 d-f jc-c p-4 c-indigo-5">C</div> </div></div>Min Content
The rows will size themselves to the smallest possible height that does not cause overflow.
<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 c-white">Pneumonoultramicroscopicsilicovolcanoconiosis</div> <div class="ai-c bg-indigo-8 d-f jc-c p-4 c-indigo-5">B</div> <div class="ai-c bg-indigo-8 d-f jc-c p-4 c-indigo-5">C</div> </div></div>Max Content
The rows will size themselves to the largest possible height based on their content.
<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 c-white">Pneumonoultramicroscopicsilicovolcanoconiosis</div> <div class="ai-c bg-indigo-8 d-f jc-c p-4 c-indigo-5">B</div> <div class="ai-c bg-indigo-8 d-f jc-c p-4 c-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.
Targeting different viewports
You can combine responsive breakpoints like sm:gar-*, md:gar-*, lg:gar-*, and xxl:gar-* to allow targeting specific utilities in different viewports.
Targeting hover states
Alternatively, you can apply :hover by using h:gar-* utility to override elements and change their values when hovering over them.