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+

New CSS drops.

Join 750+ readers who've survived clearfix hacks.

ESC