Zazz Design Framework
Reference

Aspect Ratio

Named aspect-ratio utilities for common image, video, and media formats.

Class reference

ClassRatioTypical use
aspect-anamorphic2.39 / 1Ultra-widescreen cinema
aspect-univisium2 / 1Univisium / cinematic web
aspect-widescreen16 / 9Standard HD video, presentations
aspect-landscape3 / 2Traditional landscape photography
aspect-portrait2 / 3Portrait photography
aspect-square1 / 1Avatars, product cards, social tiles

Examples

<div class="aspect-widescreen">
  <iframe src="https://www.youtube.com/embed/..." class="w-full h-full"></iframe>
</div>

<img class="aspect-square object-cover" src="avatar.jpg" alt="" />

<div class="aspect-anamorphic">
  <video src="hero.mp4" class="w-full h-full object-cover"></video>
</div>

Pair with object-fit utilities (object-cover, object-contain) to control how media fills the aspect-ratio box.

Custom ratios

For one-off ratios, apply the property directly:

.book-cover {
  aspect-ratio: 5 / 8;
}

The named utilities cover marketing and ecommerce defaults: hero blocks, product photography, video embeds. Cinematic and editorial work often calls for custom ratios; keep those as raw CSS rather than expanding the utility surface.

On this page