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