Aspect Ratio

Native aspect-ratio utilities — no wrapper element and no companion class. aspect-square, aspect-video and aspect-auto, plus the .ratio-* names (aspect-1x1, aspect-4x3, aspect-16x9, aspect-21x9) kept for migration continuity. Every name accepts a breakpoint segment, and the arbitrary form takes any ratio or token: aspect-[16/10], aspect-[1.85], aspect-[var(--r)]. The older .ratio wrapper component still ships and is now implemented on aspect-ratio rather than the padding-top hack, with its fill rule scoped to replaced elements so an overlay child keeps its own size instead of being stretched to the box. Prefer aspect-* for new markup.

Named ratios

Preview
aspect-squareaspect-videoaspect-auto

Ratio names (.ratio-* parity)

Preview
aspect-1x1aspect-4x3aspect-16x9aspect-21x9

Responsive

Preview
aspect-md-squareaspect-lg-videoaspect-sm-16x9

Arbitrary

Preview
aspect-[16/10]aspect-[1.85]aspect-[var(--r)]