W3C home > Mailing lists > Public > public-css-archive@w3.org > April 2017

[csswg-drafts] [css-units] aspect ratio units needed

From: Jen Simmons via GitHub <sysbot+gh@w3.org>
Date: Wed, 05 Apr 2017 20:18:50 +0000
To: public-css-archive@w3.org
Message-ID: <issues.opened-219702684-1491423529-sysbot+gh@w3.org>
jensimmons has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-units] aspect ratio units needed ==
I know there has been discussion of aspect ratio units in the past.

We need them. Badly. 

Especially with CSS Grid. 

Why? When? So — there are many usecases where an Author wants to maintain a specific aspect ratio in their Grid cells. They want every cell to be 4x3 or to be a square. 

For example in order to make every cell a square, maybe the browser looks at both min-content dimensions (or both results of auto) — and keeps the longer of the two. Then makes the shorter of the two into the same length as the longer. 

Or a similar thing to keep 4x3, or keep 16x9. 

I have not had a chance to read the proposed specs. Or code up demos. I just know this comes up over and over and over. I just had yet another person ask me how to do this, and all I can say is "use viewport units and a ton of media queries". We need something better. 



Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/1173 using your GitHub account
Received on Wednesday, 5 April 2017 20:18:57 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:41:11 UTC