CKTIS / CSS
rule-visibility-items — separator visibility beside empty areas
The rule-visibility-items shorthand determines which gap separator portions are painted beside empty areas. One value sets the behavior for both rows and columns.
Version: CSS modules; structured CSSWG indexes reconciled with pinned MDN BCD; Chromium 152 scope gate, per-example verification still required
Syntax
rule-visibility-items: all | around | between | normal;rule-visibility-items sets column-rule-visibility-items and row-rule-visibility-items to the same value. It controls separator painting, not item visibility or gap size. Set line style, color, and width separately.
all paints every segment; around requires an item on at least one side; between requires items on both sides. An empty grid cell is not the same as an item containing no text.
The initial value, normal, means all in Grid and grid lanes. In multicol layout it means between for columns and all for rows. The properties are not inherited; animation is discrete. They apply to Grid, multicol, and grid lanes, but not Flexbox. In grid lanes they affect only grid-axis decorations.
The example leaves the bottom-right cell empty: between should retain lines only between A and B and between A and C. This is a draft feature; the example requires local rendering verification. Accepting the declaration alone does not establish correct behavior.
Examples
<!doctype html>
<meta charset="utf-8">
<title>rule-visibility-items</title>
<style>
.grid {
display: grid;
grid-template: repeat(2, 60px) / repeat(2, 80px);
gap: 20px;
width: max-content;
column-rule: 4px solid blue;
row-rule: 4px solid blue;
rule-break: intersection;
rule-visibility-items: between;
}
.grid > div { background: #ddd; }
</style>
<div class="grid">
<div>A</div><div>B</div><div>C</div>
</div>Result
Expected with rendering support: A and B occupy the first row; C occupies the bottom-left cell. Blue separators appear between A and B and between A and C, but not beside the empty bottom-right cell.
The displayed code and declared result were verified in an isolated environment using the method recorded in the verification evidence for this exact version.