CKTIS / CSS
stroke-miterlimit — limiting sharp stroke joins
stroke-miterlimit limits how far a sharp stroke corner extends relative to stroke-width. With stroke-linejoin: miter, exceeding the limit replaces the pointed join with a bevel.
Version: CSS modules; structured CSSWG indexes reconciled with pinned MDN BCD; Chromium 152 scope gate, per-example verification still required
Syntax
stroke-miterlimit: <number>;stroke-miterlimit accepts a unitless number, defaults to 4, and is inherited. It applies to strokes on SVG shapes and text; it does not control CSS border corners. It accepts neither lengths nor percentages.
For stroke-linejoin: miter, the ratio of miter length to stroke-width is 1 / sin(θ / 2), where θ is the angle between segments. If that ratio exceeds the limit, SVG replaces the pointed join with bevel. A lower limit removes more spikes; it does not change stroke thickness. With round and bevel, the limit has no effect.
The sources differ on the allowed range: CSS Fill and Stroke Level 3 rejects values below 1, whereas SVG 2 permits nonnegative values. Use values of at least 1 for portable examples; behavior below that boundary requires checking in the target browser.
Examples
<!doctype html>
<meta charset="utf-8">
<title>stroke-miterlimit</title>
<style>
polyline {
fill: none;
stroke: #164e63;
stroke-width: 12;
stroke-linejoin: miter;
}
.low { stroke-miterlimit: 2; }
.high { stroke-miterlimit: 8; }
</style>
<svg xmlns="http://www.w3.org/2000/svg" width="320" height="160" viewBox="0 0 320 160" role="img" aria-label="stroke-miterlimit: 2 / 8">
<polyline class="low" points="30,130 70,40 110,130" />
<polyline class="high" points="190,130 230,40 270,130" />
</svg>Result
Two identical stroked angles: the left apex is beveled; the right apex retains a pointed miter.
The displayed code and declared result were verified in an isolated environment using the method recorded in the verification evidence for this exact version.