Grid Template Rows
Set the rows for a grid layout.
Widely available
This feature is well established and works across many devices and browser versions.
Chrome
Edge
Firefox
Safari
gtr-1grid-template-rows: repeat(1, minmax(0, 1fr));gtr-2grid-template-rows: repeat(2, minmax(0, 1fr));gtr-3grid-template-rows: repeat(3, minmax(0, 1fr));gtr-4grid-template-rows: repeat(4, minmax(0, 1fr));gtr-5grid-template-rows: repeat(5, minmax(0, 1fr));gtr-6grid-template-rows: repeat(6, minmax(0, 1fr));gtr-7grid-template-rows: repeat(7, minmax(0, 1fr));gtr-8grid-template-rows: repeat(8, minmax(0, 1fr));gtr-9grid-template-rows: repeat(9, minmax(0, 1fr));gtr-10grid-template-rows: repeat(10, minmax(0, 1fr));gtr-11grid-template-rows: repeat(11, minmax(0, 1fr));gtr-12grid-template-rows: repeat(12, minmax(0, 1fr));gtr-13grid-template-rows: repeat(13, minmax(0, 1fr));gtr-14grid-template-rows: repeat(14, minmax(0, 1fr));gtr-15grid-template-rows: repeat(15, minmax(0, 1fr));gtr-16grid-template-rows: 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:gtr-(value)Small≥640px
md:gtr-(value)Medium≥768px
lg:gtr-(value)Large≥1024px
xxl:gtr-(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:gtr-(value)