mask-mode

Specifies whether the mask should be treated as an alpha mask (using transparency) or a luminance mask (using brightness).

It is documented as part of the CSS Masking specification.

/* Usage Example */
.luminance-mask {
  /* Uses the brightness of the image to determine visibility */
  mask-mode: luminance;
}

/* Global values */
mask-mode: inherit;
mask-mode: initial;
mask-mode: revert;
mask-mode: revert-layer;
mask-mode: unset;
Newly available Since 2023 88% global usage

Since 2023 this feature works across the latest devices and browser versions. This feature might not work in older devices or browsers.

120+
53+
15.4+
120+
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