mask-border-slice

Specifies how to 'slice' the mask border image into nine regions (four corners, four edges, and a center). This allows the edges to scale while keeping the corners fixed.

It is documented as part of the CSS Masking specification.

/* Usage Example */
.masked-element {
  /* Slices the mask image 30px from each edge */
  mask-border-slice: 30;
}

/* Syntax */
mask-border-slice: fill;

/* Global values */
mask-border-slice: inherit;
mask-border-slice: initial;
mask-border-slice: revert;
mask-border-slice: revert-layer;
mask-border-slice: unset;
Widely available Since 2015 92% global usage

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

1+
17.2+
79+
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