CKTIS / CSS
mask-origin — mask positioning area
mask-origin selects the reference rectangle for positioning a mask image. It does not select the clipping area: mask-clip controls that separately.
Version: CSS modules; structured CSSWG indexes reconciled with pinned MDN BCD; Chromium 152 scope gate, per-example verification still required
Syntax
mask-origin: <coord-box>#;
<coord-box> = content-box | padding-box | border-box | fill-box | stroke-box | view-boxmask-origin establishes the mask positioning area used by mask-position. Its initial value is border-box; it is not inherited and animates discretely.
content-box, padding-box, and border-box select the corresponding CSS boxes. In SVG, fill-box means the object bounding box, stroke-box includes the stroke, and view-box selects the nearest SVG viewport, accounting for viewBox. Without a CSS layout box, the first three values compute to fill-box; with such a box, the SVG values compute to border-box.
Comma-separated values correspond to successive mask-image layers; shorter lists repeat. mask-clip independently restricts painting. mask-origin has no effect when the mask image references an SVG mask element.
The example isolates positioning: a non-repeating opaque mask reveals a square at the start of content-box, 30 px from the outer border edge.
Examples
<!doctype html>
<meta charset="utf-8">
<title>mask-origin</title>
<style>
body { margin: 20px; background: white; }
.sample {
box-sizing: content-box;
width: 120px;
height: 80px;
padding: 20px;
border: 10px solid #0066cc;
background: #0066cc;
mask-image: linear-gradient(black, black);
mask-mode: alpha;
mask-size: 40px 40px;
mask-repeat: no-repeat;
mask-position: 0 0;
mask-origin: content-box;
mask-clip: border-box;
}
</style>
<div class="sample"></div>Result
A 40 × 40 CSS-pixel blue square on white, with its top-left corner 50 CSS pixels from the viewport's left and top edges.
The displayed code and declared result were verified in an isolated environment using the method recorded in the verification evidence for this exact version.