The mask-origin property sets the mask positioning area — the box used as the reference when placing a mask-image. Think of it as the mask version of background-origin.
It is not inherited. For HTML boxes the initial value is border-box (background-origin defaults to padding-box). You need a mask-image first.
Baseline Widely available.
Not deprecated. Prefer standard *-box keywords. Non-standard aliases content, padding, and border exist in some engines — avoid them in new code. SVG-only values (fill-box, stroke-box, view-box) map to border-box on HTML elements.
Content-box origin. The reference is the innermost content rectangle.
Inset again. The circle moves in by border + padding.
Use case. Keep padding and border outside the masked region’s start point.
Pair with position.mask-position still applies inside this smaller area.
Edge Cases & Pitfalls
Origin is hard to see without border, padding, and a non-repeating mask.
need
Needs mask-image
Without a mask layer, changing mask-origin has no visible effect.
repeat
A full-bleed repeating mask hides the shift
Use mask-repeat: no-repeat and a sized mask so the origin corner is obvious.
default
Default differs from background-origin
mask-origin starts at border-box; background-origin starts at padding-box.
alias
Skip non-standard shortcuts
border, padding, and content are non-standard aliases. Prefer border-box, padding-box, and content-box.
Compatibility
Browser Support
mask-origin is a browser CSS property. Node.js, Deno, and Bun do not apply it.
✓ Baseline · Widely available since Dec 2023
mask-origin
Chrome 120+, Edge 120+, Firefox 53+, Safari 15.4+, Opera 106+. Use standard *-box keywords. Internet Explorer has no support.
97%Global reach
Google Chrome120+
Full support
Mozilla Firefox53+
Full support
Apple Safari15.4+
Full support
Microsoft Edge120+
Full support
Opera106+
Full support
Samsung Internet25.0+
Full support
Internet ExplorerNo support
Not supported
mask-originWidely supported
Bottom line: Safe for modern sites with standard border-box / padding-box / content-box values. Not a server runtime API.
Remember
Key Takeaways
Role: choose which box is the mask positioning area.
Common values:border-box, padding-box, content-box.
Initial value:border-box. Not inherited.
Tip: thick border + padding + a small no-repeat mask makes the effect obvious.
One line:mask-origin picks the box that mask-position measures from.
Frequently Asked Questions
It sets the mask positioning area — the box used as the reference when placing mask-image. Common choices are border-box, padding-box, and content-box.
For HTML elements with a CSS layout box, the initial value is border-box.
They work the same idea on different layers. mask-origin defaults to border-box; background-origin defaults to padding-box.
No. It only changes where an existing mask-image is positioned. Set mask-image first.
Use content-box when the mask should start from the content edge, ignoring padding and border thickness.
It is Baseline and widely available since December 2023: Chrome 120+, Edge 120+, Firefox 53+, Safari 15.4+. Prefer standard *-box keywords over non-standard content/padding/border aliases. Internet Explorer does not support it. It is a browser CSS property, not a Node.js feature.