Gap
Set the spacing between flex & grid items.
Widely available
This feature is well established and works across many devices and browser versions.
Chrome
Edge
Firefox
Safari
Usage
Define uniform spacing between rows and columns.
A
B
C
D
E
<div class="g-10 d-g gtc-3 c-white"> <div class="ai-c bg-indigo d-f jc-c p-4">A</div> <div class="ai-c bg-indigo d-f jc-c p-4">B</div> <div class="ai-c bg-indigo d-f jc-c p-4">C</div> <div class="ai-c bg-indigo d-f jc-c p-4">D</div> <div class="ai-c bg-indigo d-f jc-c p-4">E</div></div>Responsive Design
Use breakpoint prefixes to target different screen sizes. Styles apply from the breakpoint & up.
Target viewport sizes with breakpoint prefixes.
sm:g-[value]Small≥640px
md:g-[value]Medium≥768px
lg:g-[value]Large≥1024px
xxl:g-[value]Extra Large≥1536px
Hover State
Apply styles conditionally on hover using the h: prefix.
Add the h: prefix to apply styles only when the user hovers over the element.
Syntax:
h:g-[value]