Effects
Utilities for controlling the repetition of an element's mask image.
Class | Styles |
---|---|
mask-repeat | mask-repeat: repeat; |
mask-no-repeat | mask-repeat: no-repeat; |
mask-repeat-x | mask-repeat: repeat-x; |
mask-repeat-y | mask-repeat: repeat-y; |
mask-repeat-round | mask-repeat: round; |
mask-repeat-space | mask-repeat: space; |
Use the mask-repeat
utility to repeat the mask image both vertically and horizontally:
<div class="mask-[url(/img/circle.png)] mask-[size:50px_50px] mask-repeat ..."></div>
Use the mask-repeat-x
utility to only repeat the mask image horizontally:
<div class="mask-[url(/img/circle.png)] mask-[size:50px_50px] mask-repeat-x ..."></div>
Use the mask-repeat-y
utility to only repeat the mask image vertically:
<div class="mask-[url(/img/circle.png)] mask-[size:50px_50px] mask-repeat-y ..."></div>
Use the mask-repeat-space
utility to repeat the mask image without clipping:
<div class="mask-[url(/img/circle.png)] mask-[size:50px_50px] mask-repeat-space ..."></div>
Use the mask-repeat-round
utility to repeat the mask image without clipping, stretching if needed to avoid gaps:
<div class="mask-[url(/img/circle.png)] mask-[size:50px_50px] mask-repeat-round ..."></div>
Use the mask-no-repeat
utility to prevent a mask image from repeating:
<div class="mask-[url(/img/circle.png)] mask-[size:50px_50px] mask-no-repeat ..."></div>
Prefix a mask-repeat
utility with a breakpoint variant like md:
to only apply the utility at medium screen sizes and above:
<div class="mask-repeat md:mask-repeat-x ..."> <!-- ... --></div>
Learn more about using variants in the variants documentation.