border-image-repeat

Defines how the border image is filled along the edges. 'Stretch' pulls the image thin, while 'repeat' or 'round' tiles it. 'Round' is often best because it scales tiles slightly to avoid cutting them off.

It is documented as part of the CSS Backgrounds and Borders specification.

/* Usage Example */
.tiled-border {
  border: 15px solid;
  border-image-source: url(';dots.png');
  border-image-slice: 10;
  /* Tiles the dots smoothly without cutting any in half */
  border-image-repeat: round;
}

/* Syntax */
border-image-repeat: stretch;
border-image-repeat: repeat;
border-image-repeat: round;
border-image-repeat: space;

/* Global values */
border-image-repeat: inherit;
border-image-repeat: initial;
border-image-repeat: revert;
border-image-repeat: revert-layer;
border-image-repeat: unset;
Widely available Since 2017 96% global usage

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

15+
15+
6+
12+
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