Knowledge baseExam Center
ENEnglish
Choose language13

CKTIS / CSS

CSS property `row-rule-inset-cap-end`

The `row-rule-inset-cap-end` property moves only the logical end of each cap-type terminal segment. A positive value such as `20px` pulls that end in the start direction, while a negative value extends it in the end direction; the start remains independent.

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

Syntax

<inset-value>

The row-rule-inset-cap-end property moves only the logical end of each cap-type terminal segment. A positive value such as 20px pulls that end in the start direction, while a negative value extends it in the end direction; the start remains independent.

The example compares direction:ltr and direction:rtl with the same value. Image evidence shows the right end shortened in LTR and the left end in RTL, although computed start/end insets are 0/20 pixels in both.

Grammar: <inset-value>.

In vertical writing modes, logical end can map to another physical edge. A percentage uses the crossing-gap width; at an outer cap its basis is 0, and overlap-join is treated as zero. The feature belongs to an evolving Editor’s Draft, so use @supports and do not carry meaning only through the rule.

Examples

<!doctype html><meta charset="utf-8"><style>html,body{margin:0;background:white}.grid{display:grid;grid-template-rows:20px 20px;row-gap:20px;width:100px;row-rule:4px solid red;row-rule-inset-cap-end:20px;position:absolute;top:0}#ltr{left:0;direction:ltr}#rtl{left:150px;direction:rtl}</style><div id="ltr" class="grid"><i></i><i></i></div><div id="rtl" class="grid"><i></i><i></i></div><pre id="result"></pre><script>const a=getComputedStyle(ltr),b=getComputedStyle(rtl),v=[a.rowRuleInsetCapStart,a.rowRuleInsetCapEnd,b.rowRuleInsetCapStart,b.rowRuleInsetCapEnd];if(v.join('|')!=='0px|20px|0px|20px')throw new Error('row-rule-inset-cap-end mismatch '+v);result.textContent='ltr='+v[0]+'/'+v[1]+'; rtl='+v[2]+'/'+v[3]+'; directions='+a.direction+'/'+b.direction;</script>

Result

ltr=0px/20px; rtl=0px/20px; directions=ltr/rtl

The example compares `direction:ltr` and `direction:rtl` with the same value. Image evidence shows the right end shortened in LTR and the left end in RTL, although computed start/end insets are 0/20 pixels in both.

Sources