The mask-repeat property sets how each mask-image tiles inside the mask painting area. The mask can repeat on both axes, only one axis, or not at all. space leaves even gaps. round stretches copies so they fit without gaps.
The initial value is repeat. The property is not inherited. One keyword can cover both axes. Two keywords set horizontal first, then vertical. With several mask layers, list a repeat value for each layer, separated by commas. mask-position places a single no-repeat mask.
Standard-track.
Not deprecated and not experimental. Unprefixed mask-repeat is Baseline widely available. Older Safari needed -webkit-mask-repeat. Logical values such as repeat-block and repeat-inline are newer and still limited.
Fit whole tiles only.space does not clip edge copies the way repeat does.
Pin the first and last. Copies sit against the edges when more than one fits, and leftover room becomes even gaps.
Position is mostly ignored. With space, the browser places the tiles. mask-position matters mainly when only one tile fits.
Compare with round.round also avoids gaps from clipping, but it stretches each tile instead of adding whitespace.
Edge Cases & Pitfalls
If the tiles look clipped, stretched, or missing, one of these is usually why.
image
No mask-image, no tiling
mask-repeat only tiles an active mask layer. Set mask-image first, or use the mask shorthand that includes one.
clip
repeat can cut the edges
When the box size is not a multiple of the tile size, edge copies are clipped. Use space for whole tiles with gaps, or round for whole tiles that stretch.
round
round can distort the mask
It is the only common value that may change the tile aspect ratio so copies fill the box without gaps. Prefer space if you must keep the original proportions.
size
Tile size comes from mask-size
A huge mask with repeat may look like one copy. Set mask-size so each tile is small enough to see the pattern.
position
space mostly ignores position
mask-position places a no-repeat mask. With space, the browser pins and spaces the tiles unless only one tile fits.
Compatibility
Browser Support
mask-repeat is a browser painting property for CSS masking. Node.js, Deno, and Bun do not apply it. Unprefixed support is Baseline. Older WebKit used -webkit-mask-repeat.
✓ Baseline · Widely available since Dec 2023
mask-repeat
Unprefixed: Chrome 120+, Edge 120+, Firefox 53+, Safari 15.4+. Prefixed WebKit support is older. Internet Explorer has no CSS mask-repeat.
97%Modern browser support
Google Chrome120+ unprefixed · older with -webkit-
Full support
Mozilla Firefox53+
Full support
Apple Safari15.4+ unprefixed · older with -webkit-
Full support
Microsoft Edge120+ unprefixed
Full support
Opera106+ unprefixed
Full support
Samsung Internet25+ unprefixed
Full support
Internet ExplorerNo support
None
mask-repeatWidely supported
Bottom line: Safe for current browsers with the unprefixed property. Add -webkit-mask-repeat only if you must support older Safari or Chromium builds before the Baseline versions above. Prefer physical keywords over repeat-block / repeat-inline on a normal page. Do not treat this as a Node.js or other runtime feature.
Remember
Key Takeaways
Role: choose how each mask image tiles — both axes, one axis, or not at all.
Values:repeat, no-repeat, repeat-x, repeat-y, space, and round.
Initial value:repeat. It is not inherited.
Gaps vs stretch:space adds gaps; round may stretch tiles to avoid gaps.
One line:mask-repeat decides whether the mask tiles — after you have a mask-image, and often after you set a clear tile size.
Frequently Asked Questions
It sets how each mask image tiles inside the mask painting area. The mask can repeat on both axes, only horizontally, only vertically, or not at all. space and round control gaps and stretching. The initial value is repeat.
repeat, which means repeat on both axes. Edge tiles may be clipped if the box size is not a multiple of the mask size. The property is not inherited.
no-repeat shows one copy. repeat-x tiles only left to right. repeat-y tiles only top to bottom. Use mask-position to place a single no-repeat mask.
space tiles without clipping and puts even gaps between copies. round tiles without gaps and may stretch each copy so they fit the box evenly. round is the value that can change the mask aspect ratio.
No. There must be a mask-image (or a mask shorthand that sets one). Without a mask layer, changing mask-repeat has nothing to tile.
Unprefixed mask-repeat is Baseline and widely available since December 2023: Chrome 120+, Edge 120+, Firefox 53+, Safari 15.4+. Older WebKit browsers used -webkit-mask-repeat. Internet Explorer does not support it. This is a browser CSS property. Node.js, Deno, and Bun do not paint it.