CKTIS / CSS
rule-inset-cap — inset free ends of gap decorations
The rule-inset-cap shorthand sets free-end offsets for gap decorations in both the row and column directions.
Version: CSS modules; structured CSSWG indexes reconciled with pinned MDN BCD; Chromium 152 scope gate, per-example verification still required
Syntax
rule-inset-cap: <inset-value> <inset-value>?;
<inset-value> = <length-percentage> | overlap-joinrule-inset-cap sets column-rule-inset-cap and row-rule-inset-cap. A cap endpoint does not meet another painted segment at a junction; it can also occur inside the container.
One value covers both ends; two mean start and end. Positive values shorten the decoration; negative values extend it. Percentages reference the crossing gap width, or zero at container edges. overlap-join behaves as 0 here.
This is a changing specification draft. Support in the target browser requires separate verification. The example ran in Chromium and confirmed syntax acceptance, but the painted result was not checked.
Examples
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>rule-inset-cap at free ends</title>
<style>
.grid {
display: grid;
grid-template-columns: repeat(2, 5rem);
grid-template-rows: 5rem;
gap: 20px;
column-rule: 2px solid black;
rule-inset-cap: 10px;
}
.grid > div { display: grid; place-items: center; background: #eee; }
</style>
</head>
<body>
<h1>Free ends of a column rule</h1>
<p><code>rule-inset-cap: 10px</code> requests that the top and bottom free ends of the column rule each move 10px inward.</p>
<div class="grid"><div>A</div><div>B</div></div>
<script>
const supported = CSS.supports('rule-inset-cap', '10px');
console.log(`rule-inset-cap: ${supported ? 'supported (syntax only)' : 'unsupported'}`);
</script>
</body>
</html>Result
rule-inset-cap: supported (syntax only)
In an isolated Chromium 157.0.8103.51 run, the console message exactly matched the expected output. The `CSS.supports('rule-inset-cap', '10px')` check confirmed syntax acceptance, not how the rule was painted.