Knowledge baseExam Center
ENEnglish
Choose language13

CKTIS / CSS

column-rule-inset-cap-start — offsetting a rule's starting cap

The column-rule-inset-cap-start property offsets the start of a column-gap rule when that endpoint is a cap. It accepts a length, percentage, or overlap-join and affects gap decoration rather than item spacing.

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

Syntax

column-rule-inset-cap-start: <length-percentage> | overlap-join;

column-rule-inset-cap-start is a longhand in the draft CSS Gaps module. It offsets the start of a column-gap decoration only when that endpoint is a cap: at a container content edge, or at a gap junction touched by no other painted segment. Junction starts are handled by column-rule-inset-junction-start, while cap ends are handled by column-rule-inset-cap-end.

A positive value shortens the decoration from its start; a negative value extends it in the opposite direction along the gap axis. Accepted values are <length-percentage> and overlap-join; at a cap endpoint, overlap-join behaves as 0. The initial value is 0, and the property is not inherited. It applies to grid, flex, multicol, and grid lanes containers; it does not change gap size or item placement.

Percentages refer to the crossing gap width, not the rule's length. At a container edge, that basis is 0, so 50% produces no inset there. An interior cap at a gap junction can instead have a nonzero percentage basis.

The example fixes horizontal writing mode and uses one pair of cells. With rendering support, the blue rule starts 20px below the top and reaches the bottom, making it 80px long. Accepting the declaration alone does not prove correct painting. This is a draft-specification feature: verify it in the target browser. Including Chromium 152 in the verification scope is not evidence of support.

Examples

<!doctype html>
<meta charset="utf-8">
<title>column-rule-inset-cap-start</title>
<style>
  .grid {
    display: grid;
    grid-template-columns: 100px 100px;
    grid-template-rows: 100px;
    column-gap: 20px;
    width: 220px;
    writing-mode: horizontal-tb;
    direction: ltr;
    column-rule: 4px solid blue;
    column-rule-inset-cap-start: 20px;
  }
  .grid > div { background: #ddd; }
</style>
<div class="grid"><div>A</div><div>B</div></div>

Result

With rendering support: two 100px × 100px gray cells separated by a 20px gap; a centered 4px blue rule runs from 20px below the grid's top edge to its bottom edge (80px long).

The code and the description of the expected result for this version of the example were verified in an isolated environment.

Sources