Grid Template Columns
Set the columns for a grid layout.
Widely available
This feature is well established and works across many devices and browser versions.
Chrome
Edge
Firefox
Safari
Usage
Define the columns of a grid layout.
A
B
C
D
E
<div class="d-g g-4 gtc-3 ta-c c-white"> <div class="bg-indigo p-4">A</div> <div class="bg-indigo p-4">B</div> <div class="bg-indigo p-4">C</div> <div class="bg-indigo p-4">D</div> <div class="bg-indigo p-4">E</div></div>Responsiveness
Use breakpoint prefixes to target different screen sizes. Styles apply from the breakpoint & up.
Target viewport sizes with breakpoint prefixes.
sm:gtc-[value]Small≥640px
md:gtc-[value]Medium≥768px
lg:gtc-[value]Large≥1024px
xxl:gtc-[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:gtc-[value]