Una Kravets 1/28/2021

New aspect-ratio CSS property supported in Chromium, Safari Technology Preview, and Firefox Nightly

Read Original

This article explains the new CSS aspect-ratio property, now supported in Chromium, Safari Technology Preview, and Firefox Nightly. It details how the property works, its benefits over the old padding-top hack, and practical use cases like preventing layout shifts, creating responsive grids, and working with images and iframes. It also covers related properties like object-fit for controlling how media fills its container.

New aspect-ratio CSS property supported in Chromium, Safari Technology Preview, and Firefox Nightly

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser

Top of the Week