Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
March 13, 2019 02:29 pm GMT

Designing An Aspect Ratio Unit For CSS

Rachel Andrew says that the CSS Working Group designed an aspect ration unit at a recent meeting. The idea is to find an elegant solution to those times when we want the height of an element to be calculated in response to the width of the element, or vice versa.

Say, for example, we have a grid layout with a row of elements that should maintain a square (1:1) ratio. There are a few existing, but less-than-ideal ways we can … Read article

The post Designing An Aspect Ratio Unit For CSS appeared first on CSS-Tricks.


Original Link: https://www.smashingmagazine.com/2019/03/aspect-ratio-unit-css/

Share this article:    Share on Facebook
View Full Article

CSS Tricks

A Web Design Community curated by Chris Coyier

More About this Source Visit CSS Tricks