SMRTR ProgrammingMay 8, 2025Go Make Things

An aspect ratio CSS utility class

SMRTR summary

A new UI library featuring modern CSS and Web Components is in development, with a focus on HTML enthusiasts. The library includes utility classes for setting aspect ratios on images and videos. These classes use the CSS aspect-ratio property and a --ratio variable to maintain specific width-to-height ratios across different viewport sizes. The library also addresses image distortion and responsive iframe video scaling.

SMRTR provides this summary for quick context. The original article belongs to Go Make Things.

Read the original article
SMRTR Programming

Get the next batch of curated summaries in your inbox.

This archive is built from SMRTR newsletter summaries. Subscribe for hand-picked stories without the extra noise.