CKTIS / CSS
grid-area — CSS property
`grid-area` defines the area occupied by an item in a grid formatting context.
Version: CSS modules; structured CSSWG indexes reconciled with pinned MDN BCD; Chromium 152 scope gate, per-example verification still required
Syntax
<grid-line> [ / <grid-line> ]{0,3}grid-area defines the area occupied by an item in a grid formatting context.
Use it when track size or item placement must follow explicit grid lines; the example reports the resulting item coordinates and dimensions.
The accepted grammar is <grid-line> [ / <grid-line> ]{0,3}; global values still participate in the cascade.
Line numbers start at 1, negative numbers count from the end of the explicit grid, and shorthands can reset auto-placement settings.
Examples
<!doctype html>
<html lang="en"><meta charset="utf-8"><title>CKTIS CSS reference example</title>
<body><div class="probe">probe</div><pre id="result"></pre><script>
document.body.innerHTML='<div id="g"><i id="x"></i></div><pre id="result"></pre>';const g=document.querySelector("#g"),x=document.querySelector("#x");g.style.cssText="display:grid;grid-template:20px 20px/30px 30px";x.style.gridArea="2 / 2";const a=g.getBoundingClientRect(),b=x.getBoundingClientRect();document.querySelector("#result").textContent="item=("+Math.round(b.left-a.left)+","+Math.round(b.top-a.top)+"); computed="+getComputedStyle(x).gridArea;
</script></body></html>Result
item=(30,20); computed=2 / 2
The example was executed locally in an isolated, network-free Chrome session; the result comes from the browser CSS API.