mask-border-width

Sets the thickness of the mask border. If this is different from the element's actual border width, the mask border will scale to fit.

It is documented as part of the CSS Masking specification.

/* Usage Example */
.masked-element {
  /* Sets the mask border to be 20px wide */
  mask-border-width: 20px;
}

/* Syntax */
mask-border-width: auto;

/* Global values */
mask-border-width: inherit;
mask-border-width: initial;
mask-border-width: revert;
mask-border-width: revert-layer;
mask-border-width: 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