The .object-position
class is flagged as a value-driven selector.
The variable --object-position is required.
<element class="object-position" style="--object-position: /* value */;" />
Responsive
Prefix
.object-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:object-position" style="--md-object-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 object-position::before" style="--object-position-before: /* value */;" /><element class="content-after object-position::after" style="--object-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.
.object-position
Sets object-position via --object-position. E.g. 50% 50%.
object-bottom
Positions the object content at the bottom of its container.
CSS Rules
.object-bottom { object-position: bottom;}
Usage
<element class="object-bottom" />
Responsive
Prefix
.object-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:object-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.
Positions the object content at the bottom of its container.
object-center
Positions the object content in the center of its container.
CSS Rules
.object-center { object-position: center;}
Usage
<element class="object-center" />
Responsive
Prefix
.object-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:object-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 object content in the center of its container.
object-left
Positions the object content at the left of its container.
CSS Rules
.object-left { object-position: left;}
Usage
<element class="object-left" />
Responsive
Prefix
.object-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:object-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 object content at the left of its container.
object-left-bottom
Positions the object content at the bottom-left of its container.
CSS Rules
.object-left-bottom { object-position: left bottom;}
Usage
<element class="object-left-bottom" />
Responsive
Prefix
.object-left-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:object-left-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.
Positions the object content at the bottom-left of its container.
object-left-top
Positions the object content at the top-left of its container.
CSS Rules
.object-left-top { object-position: left top;}
Usage
<element class="object-left-top" />
Responsive
Prefix
.object-left-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:object-left-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 object content at the top-left of its container.
object-right
Positions the object content at the right of its container.
CSS Rules
.object-right { object-position: right;}
Usage
<element class="object-right" />
Responsive
Prefix
.object-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:object-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 object content at the right of its container.
object-right-bottom
Positions the object content at the bottom-right of its container.
CSS Rules
.object-right-bottom { object-position: right bottom;}
Usage
<element class="object-right-bottom" />
Responsive
Prefix
.object-right-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:object-right-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.
Positions the object content at the bottom-right of its container.
object-right-top
Positions the object content at the top-right of its container.
CSS Rules
.object-right-top { object-position: right top;}
Usage
<element class="object-right-top" />
Responsive
Prefix
.object-right-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:object-right-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 object content at the top-right of its container.
object-top
Positions the object content at the top of its container.
CSS Rules
.object-top { object-position: top;}
Usage
<element class="object-top" />
Responsive
Prefix
.object-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:object-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.