Knowledge baseExam Center
ENEnglish
Choose language13

CKTIS / CSS

CSS property `row-rule-visibility-items`

The `row-rule-visibility-items` property decides whether a rule segment beside empty areas is painted: `all` always paints, `around` needs an item on either side, `between` needs items on both sides, and `normal` depends on layout mode.

Version: CSS modules; structured CSSWG indexes reconciled with pinned MDN BCD; Chromium 152 scope gate, per-example verification still required

Syntax

all | around | between | normal

The row-rule-visibility-items property decides whether a rule segment beside empty areas is painted: all always paints, around needs an item on either side, between needs items on both sides, and normal depends on layout mode.

The example compares all and between in two grids with only the first column occupied. Both rules appear between occupied cells, but the sample in the empty second column stays white only for between; container geometry is unchanged.

Grammar: all | around | between | normal.

The property applies to grid, multicol, and the grid axis in grid-lanes, but not flex. In grid and for a multicol row rule, normal behaves as all; this discrete CSS Gaps Editor’s Draft feature needs @supports, and rule color must not carry meaning alone.

Examples

<!doctype html><meta charset="utf-8"><style>html,body{margin:0;background:white}.grid{display:grid;grid-template:20px 20px/40px 40px;gap:20px;width:100px;row-rule:4px solid red;position:absolute;top:0}.grid i{grid-column:1}#all{left:0;row-rule-visibility-items:all}#between{left:150px;row-rule-visibility-items:between}</style><div id="all" class="grid"><i></i><i></i></div><div id="between" class="grid"><i></i><i></i></div><pre id="result"></pre><script>const a=getComputedStyle(all),b=getComputedStyle(between),g=e=>Math.round(e.getBoundingClientRect().width)+'x'+Math.round(e.getBoundingClientRect().height);if(a.rowRuleVisibilityItems!=='all'||b.rowRuleVisibilityItems!=='between'||g(all)!=='100x60'||g(between)!=='100x60')throw new Error('visibility mismatch');result.textContent='visibility='+a.rowRuleVisibilityItems+'/'+b.rowRuleVisibilityItems+'; geometry='+g(all)+'/'+g(between);</script>

Result

visibility=all/between; geometry=100x60/100x60

The example compares `all` and `between` in two grids with only the first column occupied. Both rules appear between occupied cells, but the sample in the empty second column stays white only for `between`; container geometry is unchanged.

Sources