src/docs/mask-size.mdx
import maskImg from "@/docs/img/mask.png"; import { ApiTable } from "@/components/api-table.tsx"; import { Example } from "@/components/example.tsx"; import { Figure } from "@/components/figure.tsx"; import { ResponsiveDesign, UsingACustomValue } from "@/components/content.tsx"; import { Stripes } from "@/components/stripes.tsx";
export const title = "mask-size"; export const description = "Utilities for controlling the size of an element's mask image.";
<ApiTable rows={[ ["mask-auto", "mask-size: auto;"], ["mask-cover", "mask-size: cover;"], ["mask-contain", "mask-size: contain;"], ["mask-size-(<custom-property>)", "mask-size: var(<custom-property>);"], ["mask-size-[<value>]", "mask-size: <value>;"], ]} />
Use the mask-cover utility to scale the mask image until it fills the mask layer, cropping the image if needed:
Use the mask-contain utility to scale the mask image to the outer edges without cropping or stretching:
Use the mask-auto utility to display the mask image at its default size: