Skip to content

Grid Auto Columns

Controls the size of grid columns created implicitly.

Class Style

gac-auto

grid-auto-columns: auto;

gac-max

grid-auto-columns: max-content;

gac-min

grid-auto-columns: min-content;

Auto

Initial value

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

Sphinx of black quartz, judge my vow.
B
C
<div class="d-g gac-auto g-4 gtr-auto">
<div class="ai-c bg-indigo d-f jc-c p-4 rad-1 tc-white">Sphinx of black quartz, judge my vow.</div>
<div class="ai-c bg-indigo-8 d-f jc-c p-4 rad-1 tc-indigo-5">B</div>
<div class="ai-c bg-indigo-8 d-f jc-c p-4 rad-1 tc-indigo-5">C</div>
</div>

Min Content

The columns will size themselves to the smallest possible width that does not cause overflow.

Sphinx of black quartz, judge my vow.
B
C
<div class="d-g gac-min g-4 gtr-auto">
<div class="ai-c bg-indigo d-f jc-c p-4 rad-1 tc-white">Sphinx of black quartz, judge my vow.</div>
<div class="ai-c bg-indigo-8 d-f jc-c p-4 rad-1 tc-indigo-5">B</div>
<div class="ai-c bg-indigo-8 d-f jc-c p-4 rad-1 tc-indigo-5">C</div>
</div>

Max Content

The columns will size themselves to the largest possible width based on their content.

Sphinx of black quartz, judge my vow.
B
C
<div class="d-g gac-max g-4 gtr-auto">
<div class="ai-c bg-indigo d-f jc-c p-4 rad-1 tc-white">Sphinx of black quartz, judge my vow.</div>
<div class="ai-c bg-indigo-8 d-f jc-c p-4 rad-1 tc-indigo-5">B</div>
<div class="ai-c bg-indigo-8 d-f jc-c p-4 rad-1 tc-indigo-5">C</div>
</div>

Conditional styles

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

Breakpoint variant

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

<div class="gac-min md:gac-auto ..."></div>

Hover variant

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

<div class="gac-min h:gac-auto ..."></div>