Skip to main content

Mask Size

Utilities for controlling the size of an element's mask image.

CSS Property:mask-size
Classes:3

Mask Size Classes

ClassCSS
mask-automask-size: auto;
mask-covermask-size: cover;
mask-containmask-size: contain;

Arbitrary Values

You can use arbitrary values with square bracket notation when you need a specific value not included in the default scale.

[mask-size:value]

Responsive Variants

Apply mask size utilities at specific breakpoints using responsive prefixes.

BreakpointPrefixExample
640px+sm:sm:mask-auto
768px+md:md:mask-auto
1024px+lg:lg:mask-auto
1280px+xl:xl:mask-auto
1536px+2xl:2xl:mask-auto