coderef

MasksBaseline · Widely available

The mask CSS property (and several longhand properties) partially or completely hides an element according to the shape and depth of an image.

Supported in all major browsers for at least 30 months — safe to use without fallbacks. Baseline since Dec 7, 2023. Widely available since Jun 7, 2026.

Browser support

DesktopChrome
1–119Not supported
120+Supportedsince Dec 5, 2023
Current: 155
Edge
12–119Not supported
120+Supportedsince Dec 7, 2023
Current: 154
Firefox
1–52Not supported
53+Supportedsince Apr 19, 2017
Current: 157
Safari
1–15.3Not supported
15.4+Supportedsince Mar 14, 2022
Current: 27
MobileChrome Android
18–119Not supported
120+Supportedsince Dec 5, 2023
Current: 155
Firefox Android
4–52Not supported
53+Supportedsince Apr 19, 2017
Current: 157
Safari iOS
1–15.3Not supported
15.4+Supportedsince Mar 14, 2022
Current: 27

How to use

This feature is Baseline widely available — use it freely, no fallback needed.

Example

Full syntax and examples are on MDN: mask.

Feature detection

CSS · check before using
@supports (mask: initial) {
  /* styles that rely on mask */
}

/* or in JavaScript */
if (CSS.supports("mask", "initial")) {
  // use it
}

Sub-features

Support for each part of the feature (28). The overall table above shows when the whole feature works.

Sub-featureChromeEdgeFirefoxSafariChrome AndroidFirefox AndroidSafari iOS
mask1201205315.41205315.4
mask-clip1201205315.41205315.4
mask-clip.border✕✕✕15.4✕✕15.4
mask-clip.content✕✕✕15.4✕✕15.4
mask-clip.padding✕✕✕15.4✕✕15.4
mask-clip.text✕✕✕15.4✕✕15.4
mask-composite1201205315.41205315.4
mask-composite.add1201205315.41205315.4
mask-composite.exclude1201205315.41205315.4
mask-composite.intersect1201205315.41205315.4
mask-composite.subtract1201205315.41205315.4
mask-image1201205315.41205315.4
mask-image.multiple_mask_images1201205315.41205315.4
mask-image.svg_masks12012053✕12053✕
mask-mode12012053✕12053✕
mask-mode.alpha12012053✕12053✕
mask-mode.luminance12012053✕12053✕
mask-mode.match-source12012053✕12053✕
mask-origin1201205315.41205315.4
mask-origin.border✕✕✕15.4✕✕15.4
Show 8 more
Sub-featureChromeEdgeFirefoxSafariChrome AndroidFirefox AndroidSafari iOS
mask-origin.content✕✕✕15.4✕✕15.4
mask-origin.fill-box12012053✕12053✕
mask-origin.padding✕✕✕15.4✕✕15.4
mask-origin.stroke-box12012053✕12053✕
mask-origin.view-box12012053✕12053✕
mask-position1201205315.41205315.4
mask-repeat1201205315.41205315.4
mask-size1201205315.41205315.4