Hacker News new | past | comments | ask | show | jobs | submit login

I started html when I was about 11 so I’m at 25 years.

I just discovered last night there’s an aspect ratio property…

https://caniuse.com/mdn-css_properties_aspect-ratio




It’s pretty new though. Less than 2 years I think.


I was just shocked. Last night I’m like “hmm need to maintain aspect ratio on this box. Maybe I can use calc and vh or something.

And this shocked up in Google. Rocked my world. I wanna go back across a bunch of products I’ve worked on over the years to fix stuff using this!

One of my favourite features now!


It is definitely magical! So many hours saved trying to find the right responsive break points for those particular card UIs.


aspect-ratio is a new standard, so don't feel too bad about that




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: