CKTIS / CSS
rule-overlap — separator painting order
The rule-overlap property selects which gap separator is painted on top where row and column decorations intersect. It does not change gap sizes or item positions.
Version: CSS modules; structured CSSWG indexes reconciled with pinned MDN BCD; Chromium 152 scope gate, per-example verification still required
Syntax
rule-overlap: row-over-column | column-over-row;rule-overlap controls the painting order of overlapping gap decorations. row-over-column paints row decorations above column decorations; column-over-row reverses that order. The property does not create separators itself: the example defines them through row-rule and column-rule.
The initial value is row-over-column. The property is not inherited, its computed value is as specified, and its animation is discrete. It applies to grid, flex, and grid lanes containers, not multi-column containers.
Decorations take up no space. rule-overlap selects painting order, whereas rule-break controls breaks at intersections. The example uses rule-break: none so both separators continue through the grid center.
This feature is defined in the changeable CSS Gaps Module Level 1 draft. Do not infer support from the Chromium 152 scope gate alone: the example requires local rendering verification in the target browser.
Examples
<!doctype html>
<meta charset="utf-8">
<title>rule-overlap</title>
<style>
.grid {
display: grid;
grid-template: repeat(2, 60px) / repeat(2, 60px);
gap: 20px;
width: 140px;
writing-mode: horizontal-tb;
row-rule: 8px solid red;
column-rule: 8px solid blue;
rule-break: none;
rule-overlap: column-over-row;
}
.grid > div { background: #eee; }
</style>
<div class="grid">
<div>1</div><div>2</div><div>3</div><div>4</div>
</div>Result
Expected with rendering support: a 140px × 140px grid with four cells, a red horizontal separator and a blue vertical separator. The central 8px × 8px overlap is blue. Changing rule-overlap to row-over-column makes it red without moving the cells.
The displayed code and declared result were verified in an isolated environment using the method recorded in the verification evidence for this exact version.