The following is a Stylus mixin for the CSS3 border-image property, which sets an image as the border.

border-image(source, slice, width, outset, repeat)
  border-image-source: url(source)
  border-image-slice: slice
  border-image-width: width
  border-image-outset: outset
  border-image-repeat: repeat
  -webkit-border-image: url(source) slice width outset repeat
  -moz-border-image: url(source) slice width outset repeat
  -ms-border-image: url(source) slice width outset repeat
  -o-border-image: url(source) slice width outset repeat

Usage of the border image Stylus mixin is:

border-image("image.png", slice, width, outset, repeat)

Taking the usage into consideration, an example would be:

border-image("border.png", 100%, 1, 0, stretch)

So, lets say you add the border image Stylus mixin to the border-image CSS class; the code would be:

.border-image
  border-image("border.png", 100%, 1, 0, stretch)

The generated CSS would be:

.border-image {
  border-image-source: url("border.png");
  border-image-slice: 100%;
  border-image-width: 1;
  border-image-outset: 0;
  border-image-repeat: stretch;
  -webkit-border-image: url("border.png") 100% 1 0 stretch;
  -moz-border-image: url("border.png") 100% 1 0 stretch;
  -ms-border-image: url("border.png") 100% 1 0 stretch;
  -o-border-image: url("border.png") 100% 1 0 stretch;
}