mask-type

An SVG property (also available in CSS) that determines whether an SVG <mask> element should be treated as an alpha mask or a luminance mask.

It is documented as part of the CSS Masking specification.

/* Usage Example */
/* In an SVG definition */
mask {
  /* Sets the default behavior for this mask to use transparency */
  mask-type: alpha;
}

/* Syntax */
mask-type: luminance;
mask-type: alpha;

/* Global values */
mask-type: inherit;
mask-type: initial;
mask-type: revert;
mask-type: revert-layer;
mask-type: unset;
Widely available Since 2020 96% global usage

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

24+
35+
7+
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