CSS mask-mode Property


The mask-mode property determines whether the image in the mask layer should be treated as a luminance mask or an alpha mask.

Syntax

Example

Preview

Property Values

Value Description
match-source Set mask-mode to alpha if the mask-image property is an image (an image URL or a gradient). If the mask-image property is an SVG <mask> element, use the <mask-type property of the <mask> element. This is the default setting.
luminance As the mask values, use the luminance values of the mask image.
alpha Use the mask image's alpha values as the mask values.
initial This property is set to its default value.
inherit This property is inherited from its parent element.

Supported Browsers

Property Chrome Firefox Safari Edge / IE Opera
mask-mode Not supported 53.0 Not supported Not supported Not supported