mask-typeBaseline · Widely available
The mask-type CSS property on an SVG <mask> element sets whether the mask is a luminance or alpha mask.
Supported in all major browsers for at least 30 months — safe to use without fallbacks. Baseline since Jan 15, 2020. Widely available since Jul 15, 2022.
Browser support
DesktopChrome
1–23Not supported
24+Supportedsince Jan 10, 2013
Current: 155Edge
12–18Not supported
79+Supportedsince Jan 15, 2020
Current: 154Firefox
1–34Not supported
35+Supportedsince Jan 13, 2015
Current: 157Safari
1–6Not supported
7+Supportedsince Oct 22, 2013
Current: 27MobileChrome Android
18–18Not supported
25+Supportedsince Feb 27, 2013
Current: 155Firefox Android
4–34Not supported
35+Supportedsince Jan 13, 2015
Current: 157Safari iOS
1–6Not supported
7+Supportedsince Sep 18, 2013
Current: 27How to use
This feature is Baseline widely available — use it freely, no fallback needed.
Example
Full syntax and examples are on MDN: mask-type.
Feature detection
CSS · check before using
@supports (mask-type: initial) {
/* styles that rely on mask-type */
}
/* or in JavaScript */
if (CSS.supports("mask-type", "initial")) {
// use it
}Documentation (MDN)
Specification
Sub-features
Support for each part of the feature (3). The overall table above shows when the whole feature works.
| Sub-feature | Chrome | Edge | Firefox | Safari | Chrome Android | Firefox Android | Safari iOS |
|---|---|---|---|---|---|---|---|
| mask-type | 24 | 79 | 35 | 7 | 25 | 35 | 7 |
| mask-type.alpha | 24 | 79 | 35 | 7 | 25 | 35 | 7 |
| mask-type.luminance | 24 | 79 | 35 | 7 | 25 | 35 | 7 |