Gap
Controls gaps between grid and flexbox elements.
Class | Properties |
---|---|
g-0 | gap: 0rem; |
g-1 | gap: 0.25rem; |
g-2 | gap: 0.5rem; |
g-3 | gap: 0.75rem; |
g-4 | gap: 1rem; |
g-5 | gap: 1.25rem; |
g-6 | gap: 1.5rem; |
g-7 | gap: 1.75rem; |
g-8 | gap: 2rem; |
g-9 | gap: 2.25rem; |
g-10 | gap: 2.5rem; |
g-11 | gap: 2.75rem; |
g-12 | gap: 3rem; |
g-13 | gap: 3.25rem; |
g-14 | gap: 3.5rem; |
g-15 | gap: 3.75rem; |
g-16 | gap: 4rem; |
This example sets the gap to 2.5rem. The element will have uniform spacing of 2.5rem between its rows and columns.
<div class="g-10 d-g gtc-3 stripes tc-white"> <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 class="ai-c bg-indigo d-f jc-c p-4 rad-1">F</div></div>
Utilizing utilities conditionally
Override existing utilities based on the user's screen size or other factors, such as hover states. Learn more about modifiers in our documentation.
Responsive breakpoints
You can combine responsive breakpoints like sm:g-*
,md:g-*
, lg:g-*
, and xxl:g-*
allows targeting specific utilities in
different viewports.
<div class="g-1 md:g-2 ..."></div>
Utilizing utilities conditionally
Override existing utilities based on the user's screen size or other factors, such as hover states. Learn more about modifiers in our documentation.
Hover states
Alternatively, you can apply :hover
by using h:g-*
utility to override elements
and change their values when hovering over them.
<div class="g-1 h:g-2 ..."></div>