Knowledge baseExam Center
ENEnglish
Choose language13

CKTIS / CSS

CSS property `row-rule-inset`

The `row-rule-inset` shorthand sets `row-rule-inset-cap` and `row-rule-inset-junction`; values before `/` address free segment ends, while the optional part after the slash separately controls ends that meet other painted gaps.

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

Syntax

<'row-rule-inset-cap'> [ / <'row-rule-inset-junction'> ]?

The row-rule-inset shorthand sets row-rule-inset-cap and row-rule-inset-junction; values before / address free segment ends, while the optional part after the slash separately controls ends that meet other painted gaps.

The example uses row-rule-inset:10px 20px without a slash. Chromium serializes 10/20 for cap and the copied 10/20 for junction; pixels show those insets at both outer ends and beside the blue crossing.

Grammar: <'row-rule-inset-cap'> [ / <'row-rule-inset-junction'> ]?.

Positive insets shorten a segment; negative ones can extend it. A percentage refers to the crossing-gap width and resolves against 0 at an edge without such a gap; overlap-join joins junctions but acts as zero at caps. The syntax is evolving in an Editor’s Draft, so gate it with @supports. When the junction part is omitted, row-rule-inset-junction copies the corresponding cap values; within either pair, an omitted end copies its corresponding start.

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;column-rule:4px solid blue;row-rule-break:intersection;row-rule-inset:10px 20px}</style><div id="grid"><i></i><i></i><i></i><i></i></div><pre id="result"></pre><script>const s=getComputedStyle(grid),v=[s.rowRuleInset,s.rowRuleInsetCapStart,s.rowRuleInsetCapEnd,s.rowRuleInsetJunctionStart,s.rowRuleInsetJunctionEnd];if(v.join('|')!=='10px 20px / 10px 20px|10px|20px|10px|20px')throw new Error('row-rule-inset omission mismatch '+v);result.textContent='shorthand='+v[0]+'; cap='+v[1]+'/'+v[2]+'; junction='+v[3]+'/'+v[4];</script>

Result

shorthand=10px 20px / 10px 20px; cap=10px/20px; junction=10px/20px

The example uses `row-rule-inset:10px 20px` without a slash. Chromium serializes 10/20 for cap and the copied 10/20 for junction; pixels show those insets at both outer ends and beside the blue crossing.

Sources