4 ms·
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-botto
by darepublic 6y ago
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.
- rattray 6y agoThe post mentions `aspect-ratio`, which isn't available in most browsers yet – will that work for you once it's ready?
- darepublic 6y agoah, 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)
- reificator 6y agoAre you referring to this item from TFA? https://web.dev/one-line-layouts/#10.-respect-for-aspect:-aspect-ratio:-lesswidthgreater-lessheightgreater https://web.dev/one-line-layouts/#10.-respect-for-aspect:-as...