The .mask-position
class is flagged as a value-driven selector.
The variable --mask-position is required.
<element class="mask-position" style="--mask-position: /* value */;" />
Responsive
Prefix
.mask-position
utility with a breakpoint variant (e.g., md:) to apply styles at
specific screen sizes (Supported breakpoints are
xm through 2xl).
<element class="md:mask-position" style="--md-mask-position: /* value */;" />
States
States are generated dynamically at runtime and always
come last. Append a state like :hover or
:focus to the end of the
class. This works in conjunction with breakpoints
.
The ::before and ::after utility classes
are supported too. Granted that you add the mandatory content-before or content-after class in
order for them to work.
<element class="content-before mask-position::before" style="--mask-position-before: /* value */;" /><element class="content-after mask-position::after" style="--mask-position-after: /* value */;" />
Shorthand
Value-driven classes support a shorthand syntax like bg=pink or p=4. The runtime
processes this for you. Unlike :hover that is
generating CSS on the fly, shorthand only splits it
and appends the corresponding style.
This feature may cause CLS (Cumulative Layout
Shift). Make sure to include a
z-not-ready
class in your <head>
tag.
.mask-position
Positions the mask layer that controls which parts of an element are visible.
mask-top-left
Positions the mask image at the top-left corner via mask-position.
CSS Rules
.mask-top-left { mask-position: top left;}
Usage
<element class="mask-top-left" />
Responsive
Prefix
.mask-top-left
utility with a breakpoint variant (e.g., md:) to apply styles at
specific screen sizes (Supported breakpoints are
xm through 2xl).
<element class="md:mask-top-left" />
States
States are generated dynamically at runtime and always
come last. Append a state like :hover or
:focus to the end of the
class. This works in conjunction with breakpoints
.
The ::before and ::after utility classes
are supported too. Granted that you add the mandatory content-before or content-after class in
order for them to work.
Positions the mask image at the top-left corner via mask-position.
mask-top
Positions the mask image at the top-center via mask-position.
CSS Rules
.mask-top { mask-position: top;}
Usage
<element class="mask-top" />
Responsive
Prefix
.mask-top
utility with a breakpoint variant (e.g., md:) to apply styles at
specific screen sizes (Supported breakpoints are
xm through 2xl).
<element class="md:mask-top" />
States
States are generated dynamically at runtime and always
come last. Append a state like :hover or
:focus to the end of the
class. This works in conjunction with breakpoints
.
The ::before and ::after utility classes
are supported too. Granted that you add the mandatory content-before or content-after class in
order for them to work.
Positions the mask image at the top-center via mask-position.
mask-top-right
Positions the mask image at the top-right corner via mask-position.
CSS Rules
.mask-top-right { mask-position: top right;}
Usage
<element class="mask-top-right" />
Responsive
Prefix
.mask-top-right
utility with a breakpoint variant (e.g., md:) to apply styles at
specific screen sizes (Supported breakpoints are
xm through 2xl).
<element class="md:mask-top-right" />
States
States are generated dynamically at runtime and always
come last. Append a state like :hover or
:focus to the end of the
class. This works in conjunction with breakpoints
.
The ::before and ::after utility classes
are supported too. Granted that you add the mandatory content-before or content-after class in
order for them to work.
Positions the mask image at the top-right corner via mask-position.
mask-left
Positions the mask image at the center-left via mask-position.
CSS Rules
.mask-left { mask-position: left;}
Usage
<element class="mask-left" />
Responsive
Prefix
.mask-left
utility with a breakpoint variant (e.g., md:) to apply styles at
specific screen sizes (Supported breakpoints are
xm through 2xl).
<element class="md:mask-left" />
States
States are generated dynamically at runtime and always
come last. Append a state like :hover or
:focus to the end of the
class. This works in conjunction with breakpoints
.
The ::before and ::after utility classes
are supported too. Granted that you add the mandatory content-before or content-after class in
order for them to work.
Positions the mask image at the center-left via mask-position.
mask-center
Positions the mask image at the center via mask-position.
CSS Rules
.mask-center { mask-position: center;}
Usage
<element class="mask-center" />
Responsive
Prefix
.mask-center
utility with a breakpoint variant (e.g., md:) to apply styles at
specific screen sizes (Supported breakpoints are
xm through 2xl).
<element class="md:mask-center" />
States
States are generated dynamically at runtime and always
come last. Append a state like :hover or
:focus to the end of the
class. This works in conjunction with breakpoints
.
The ::before and ::after utility classes
are supported too. Granted that you add the mandatory content-before or content-after class in
order for them to work.
Positions the mask image at the center via mask-position.
mask-right
Positions the mask image at the center-right via mask-position.
CSS Rules
.mask-right { mask-position: right;}
Usage
<element class="mask-right" />
Responsive
Prefix
.mask-right
utility with a breakpoint variant (e.g., md:) to apply styles at
specific screen sizes (Supported breakpoints are
xm through 2xl).
<element class="md:mask-right" />
States
States are generated dynamically at runtime and always
come last. Append a state like :hover or
:focus to the end of the
class. This works in conjunction with breakpoints
.
The ::before and ::after utility classes
are supported too. Granted that you add the mandatory content-before or content-after class in
order for them to work.
Positions the mask image at the center-right via mask-position.
mask-bottom-left
Positions the mask image at the bottom-left corner via mask-position.
CSS Rules
.mask-bottom-left { mask-position: bottom left;}
Usage
<element class="mask-bottom-left" />
Responsive
Prefix
.mask-bottom-left
utility with a breakpoint variant (e.g., md:) to apply styles at
specific screen sizes (Supported breakpoints are
xm through 2xl).
<element class="md:mask-bottom-left" />
States
States are generated dynamically at runtime and always
come last. Append a state like :hover or
:focus to the end of the
class. This works in conjunction with breakpoints
.
The ::before and ::after utility classes
are supported too. Granted that you add the mandatory content-before or content-after class in
order for them to work.
Positions the mask image at the bottom-left corner via mask-position.
mask-bottom
Positions the mask image at the bottom-center via mask-position.
CSS Rules
.mask-bottom { mask-position: bottom;}
Usage
<element class="mask-bottom" />
Responsive
Prefix
.mask-bottom
utility with a breakpoint variant (e.g., md:) to apply styles at
specific screen sizes (Supported breakpoints are
xm through 2xl).
<element class="md:mask-bottom" />
States
States are generated dynamically at runtime and always
come last. Append a state like :hover or
:focus to the end of the
class. This works in conjunction with breakpoints
.
The ::before and ::after utility classes
are supported too. Granted that you add the mandatory content-before or content-after class in
order for them to work.
Prefix
.mask-bottom-right
utility with a breakpoint variant (e.g., md:) to apply styles at
specific screen sizes (Supported breakpoints are
xm through 2xl).
<element class="md:mask-bottom-right" />
States
States are generated dynamically at runtime and always
come last. Append a state like :hover or
:focus to the end of the
class. This works in conjunction with breakpoints
.
The ::before and ::after utility classes
are supported too. Granted that you add the mandatory content-before or content-after class in
order for them to work.