mask-type
Summary
Defines whether the content of the <mask> element is treated as as luminance mask or an alpha mask.
Overview table
- Initial value
luminance
- Applies to
- <mask> elements.
- Inherited
- No
- Media
- visual
- Computed value
- the unique non-ambiguous order defined by the formal grammar
- Animatable
- No
- Percentages
- N/A
Syntax
mask-type: alpha
mask-type: luminance
Values
- luminance
- Indicates that the luminance values of the mask should be used.
- alpha
- Indicates that the alpha values of the mask should be used.
Examples
Alpha mask type
<mask style="mask-type: alpha">
<circle cx="50%" cy="50%" r="50%"/>
</mask>
Luminance mask type
<mask style="mask-type: luminance">
<circle cx="50%" cy="50%" r="50%" fill="white"/>
</mask>
Related specifications
- CSS Masking Level 1
- W3C Last Call Working Draft
- CSS Masking Level 1
- W3C Editor’s Draft