Get to know MDN better
This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.
The read-only maskContentUnits property of the SVGMaskElement interface reflects the maskContentUnits attribute. It indicates which coordinate system to use for the contents of the <mask> element.
An SVGAnimatedEnumeration representing the coordinate system. The possible values are defined in the SVGUnitTypes interface:
0 (SVG_UNIT_TYPE_UNKNOWN)The type is not one of the predefined types.
1 (SVG_UNIT_TYPE_USERSPACEONUSE)Corresponds to a value of userSpaceOnUse for the maskContentUnits attribute and means that all coordinates inside the element refer to the user coordinate system as defined when the mask was created. It is the default value.
2 (SVG_UNIT_TYPE_OBJECTBOUNDINGBOX)Corresponds to a value of objectBoundingBox for the attribute and means that all coordinates inside the element are relative to the bounding box of the element the mask is applied to. It means that the origin of the coordinate system is the top left corner of the object bounding box and the width and height of the object bounding box are considered to have a length of 1 unit value.
| CSS Masking Module Level 1 # dom-svgmaskelement-maskcontentunits |
Enable JavaScript to view this browser compatibility table.
This page was last modified on Jul 26, 2024 by MDN contributors.
Your blueprint for a better internet.
Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2026 by individual mozilla.org contributors. Content available under a Creative Commons license.