Flexbox & GridGrid Auto Columns

Grid Auto Columns

Controls the size of grid columns created implicitly.

ClassStyle
gac-autogrid-auto-columns: auto;
gac-maxgrid-auto-columns: max-content;
gac-mingrid-auto-columns: min-content;

Auto

Initial value

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

<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.

<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.

<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>

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:gac-*, md:gac-*, lg:gac-*, and xxl:gac-* to allow targeting specific utilities in different viewports.

Using hover states

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