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 stories in your inbox.

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

Related Stories

Browse Programming
ProgrammingAug 25, 2026

The End of Programming

AI rewrote Bun's entire JavaScript runtime—one million lines of code in eleven days—for ~$165,000, with minimal human involvement. As AI-generated code surges exponentially,...