Re:Ten modern layouts in one line of CSS
by darepublic on Friday July 31, 2020 @10:34AM
(#24008922)
The thing I want to see in css is a way to define blocks where the height is a percentage of the width. There is a well know hack to do this with padding-bottom but.. yea its a non-intuitive hack.
[ Parent
| on HN ]
The post mentions `aspect-ratio`, which isn't available in most browsers yet – will that work for you once it's ready?
Re:Ten modern layouts in one line of CSS
by darepublic on Friday July 31, 2020 @10:53AM
(#24009175)
ah, shame on me for not reading further. Yea that sounds like just what I'd like, assuming that the aspect ratio block can also contain children (which I'm guessing it will)
Re:Ten modern layouts in one line of CSS
by reificator on Friday July 31, 2020 @11:21AM
(#24009491)
Are you referring to this item from TFA?
https://web.dev/one-line-layouts/#10.-respect-for-aspect:-as...