Skip to content

Gap

Controls gaps between grid and flexbox elements.

Utility Properties
Error: 429

This example sets the gap to 2.5rem. The element will have uniform spacing of 2.5rem between its rows and columns.

A
B
C
D
E
<div class="g-10 d-g gtc-3 tc-white" id="area">
<div class="ai-c bg-indigo d-f jc-c p-4 rad-1">A</div>
<div class="ai-c bg-indigo d-f jc-c p-4 rad-1">B</div>
<div class="ai-c bg-indigo d-f jc-c p-4 rad-1">C</div>
<div class="ai-c bg-indigo d-f jc-c p-4 rad-1">D</div>
<div class="ai-c bg-indigo d-f jc-c p-4 rad-1">E</div>
</div>

Conditional styles

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

Media modifier

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

<div class="g-1 md:g-2 ..."></div>

Hover modifier

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

<div class="g-1 h:g-2 ..."></div>