CKTIS / CSS
align-content — distribution of the whole set of lines or tracks
`align-content` aligns a container’s content as a group along its cross or block axis when free space exists.
Version: CSS modules; structured CSSWG indexes reconciled with pinned MDN BCD; Chromium 152 scope gate, per-example verification still required
Syntax
normal | <baseline-position> | <content-distribution> | <overflow-position>? <content-position>align-content aligns a container’s content as a group along its cross or block axis when free space exists.
A two-line flex container using space-between places lines at 0/100px; switching to center places them at 40/60px. Single-line nowrap remains at 0px, proving the property has no effect there.
Grammar: normal | <baseline-position> | <content-distribution> | <overflow-position>? <content-position>.
normal usually acts as stretch in flex and grid, but as start in ordinary block; multicol is covered too. space-between, space-around, and space-evenly distribute surplus space, while positions and baselines pack the group. Overflow modifiers safe and unsafe are currently marked at-risk in Box Alignment 3. The property is not inherited and animates as discrete.
Examples
const make=(wrap,align)=>{const box=document.createElement('div');box.style.cssText='display:flex;flex-wrap:'+wrap+';align-content:'+align+';align-items:flex-start;width:120px;height:120px';for(let i=0;i<4;i++){const item=document.createElement('div');item.style.cssText='flex:0 0 60px;height:20px';box.append(item)}document.body.append(box);return box};
const positions=box=>[...box.children].map(item=>item.offsetTop-box.offsetTop);
const multi=make('wrap','space-between');const between=positions(multi);multi.style.alignContent='center';const center=positions(multi);
const single=make('nowrap','center');const nowrap=positions(single);
console.log('between='+between[0]+'/'+between[2]+'; center='+center[0]+'/'+center[2]+'; nowrap='+nowrap[0]+'; computed='+getComputedStyle(multi).alignContent);Result
between=0/100; center=40/60; nowrap=0; computed=center
`align-content` aligns a container’s content as a group along its cross or block axis when free space exists.