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
gtc-1grid-template-columns: repeat(1, minmax(0, 1fr));gtc-2grid-template-columns: repeat(2, minmax(0, 1fr));gtc-3grid-template-columns: repeat(3, minmax(0, 1fr));gtc-4grid-template-columns: repeat(4, minmax(0, 1fr));gtc-5grid-template-columns: repeat(5, minmax(0, 1fr));gtc-6grid-template-columns: repeat(6, minmax(0, 1fr));gtc-7grid-template-columns: repeat(7, minmax(0, 1fr));gtc-8grid-template-columns: repeat(8, minmax(0, 1fr));gtc-9grid-template-columns: repeat(9, minmax(0, 1fr));gtc-10grid-template-columns: repeat(10, minmax(0, 1fr));gtc-11grid-template-columns: repeat(11, minmax(0, 1fr));gtc-12grid-template-columns: repeat(12, minmax(0, 1fr));gtc-13grid-template-columns: repeat(13, minmax(0, 1fr));gtc-14grid-template-columns: repeat(14, minmax(0, 1fr));gtc-15grid-template-columns: repeat(15, minmax(0, 1fr));gtc-16grid-template-columns: repeat(16, minmax(0, 1fr));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)