CKTIS / CSS
grid-auto-flow — CSS property
`grid-auto-flow` defines the direction and density of auto-placement 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
[ row | column ] || densegrid-auto-flow defines the direction and density of auto-placement 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 [ row | column ] || dense; 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="a"></i><i id="b"></i><i id="c"></i></div><pre id="result"></pre>';const g=document.querySelector("#g");g.style.cssText="display:grid;grid-template-rows:20px 20px;grid-auto-columns:30px;grid-auto-flow:column";const a=g.getBoundingClientRect(),c=document.querySelector("#c").getBoundingClientRect();document.querySelector("#result").textContent="third=("+Math.round(c.left-a.left)+","+Math.round(c.top-a.top)+"); computed="+getComputedStyle(g).gridAutoFlow;
</script></body></html>Result
third=(30,0); computed=column
The example was executed locally in an isolated, network-free Chrome session; the result comes from the browser CSS API.