--- name: layout-object-fit-position description: Controlling how replaced elements (images, video) are resized and positioned within their container --- # Object Fit & Object Position Utilities for controlling how replaced elements like `` and `` are resized and positioned within their container. ## Usage ### Object fit ```html ``` ### Object position ```html ``` ### Responsive ```html ``` ## Key Points - `object-contain` - maintain aspect ratio, fit inside container - `object-cover` - maintain aspect ratio, cover container (may crop) - `object-fill` - stretch to fill container - `object-scale-down` - like `contain` but never upscale - `object-none` - original size, ignore container - Position: `object-top-left`, `object-top`, `object-top-right`, `object-left`, `object-center`, `object-right`, `object-bottom-left`, `object-bottom`, `object-bottom-right` - Custom: `object-[25%_75%]`, `object-(--custom-property)`