stroke-linecap

Defines the shape of the ends of an SVG path. You can make them blunt (butt), rounded (round), or extended (square).

It is documented as part of the Scalable Vector Graphics specification.

/* Usage Example */
path.icon-line {
  /* Gives the ends of the line a nice smooth, rounded look */
  stroke-linecap: round;
}

/* Syntax */
stroke-linecap: butt;
stroke-linecap: round;
stroke-linecap: square;

/* Global values */
stroke-linecap: inherit;
stroke-linecap: initial;
stroke-linecap: revert;
stroke-linecap: revert-layer;
stroke-linecap: unset;
Widely available Since 2020 96% global usage

This feature is well established and works across many devices and browser versions. It has been available across browsers since 2020.

1+
1.5+
4+
15+
Kinsta

Your first month is free

Managed WordPress hosting for faster sites.

Learn more

New CSS drops.

Join 600+ readers who've survived clearfix hacks.

ESC