CKTIS / CSS
stroke-linejoin — stroke join shapes
The stroke-linejoin property controls corners where SVG stroke segments meet. Learn miter, round, and bevel, how stroke-miterlimit affects pointed joins, and how SVG 2 syntax differs from the proposed CSS extension.
Version: CSS modules; structured CSSWG indexes reconciled with pinned MDN BCD; Chromium 152 scope gate; verification is per example (usage: passed)
Syntax
/* SVG 2 */
stroke-linejoin: miter | miter-clip | round | bevel | arcs;
/* CSS Fill and Stroke Level 3 draft */
stroke-linejoin: [ crop | arcs | miter ] || [ bevel | round | fallback ];stroke-linejoin controls joins between stroke segments on SVG shapes and text. It does not control the ends of open subpaths—that is the role of stroke-linecap. Its initial value is miter; it is inherited and animates discretely.
In SVG 2, miter makes a pointed corner, round rounds it, and bevel cuts it off. With miter, if the ratio of miter length to stroke width exceeds stroke-miterlimit, the join becomes bevel. The initial limit is 4.
SVG 2 also defines miter-clip and arcs. miter-clip works like miter, but when the limit is exceeded, it clips the tip at the stroke-miterlimit boundary instead of switching to bevel. arcs extends the outer stroke edges with arcs that match the curvature of those edges at the join. Browser support for miter-clip and arcs is not consistent. For cross-browser use, prefer the three values shown in the example: miter, round, and bevel.
The sources describe different grammars: the CSS Fill and Stroke Level 3 draft proposes [ crop | arcs | miter ] || [ bevel | round | fallback ]. The || operator means one or both groups, in either order. This is a draft extension, not evidence of browser support.
The example draws the same chevron with three join styles. The expected appearance of this version was verified in an isolated environment. Recognizing a declaration alone does not establish correct rendering.
Examples
<!doctype html>
<meta charset="utf-8">
<title>stroke-linejoin</title>
<style>
polyline {
fill: none;
stroke: #164e63;
stroke-width: 16px;
stroke-miterlimit: 4;
}
.miter { stroke-linejoin: miter; }
.round { stroke-linejoin: round; }
.bevel { stroke-linejoin: bevel; }
</style>
<svg xmlns="http://www.w3.org/2000/svg" width="360" height="120" viewBox="0 0 360 120" role="img" aria-label="miter, round, bevel">
<polyline class="miter" points="20,90 60,30 100,90" />
<polyline class="round" points="140,90 180,30 220,90" />
<polyline class="bevel" points="260,90 300,30 340,90" />
</svg>Result
Expected visual result, left to right: three stroked chevrons with a pointed, rounded, and bevelled top join. No console output.
The displayed code and declared result were verified in an isolated environment using the method recorded in the verification evidence for this exact version.