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

Yet 15 years later, I still can't specify a width and aspect ratio for an div without some unintuitive nested div hell.



  div {
    width: 640px;
    aspect-ratio: 16 / 9;
  }


> But with Chrome and Firefox supporting it behind an experimental flag

So basically not supported, and you have to go back to div hell.

There should be some future.js file that you can import to make all this stuff just work in older browsers.


Where are you getting that from? It seems to be fully supported: https://caniuse.com/mdn-css_properties_aspect-ratio

I've been using if for months with no issues in cross-browser testing, and I haven't enabled any experimental flags.



Experimental on Safari, so it's unusable of you have a real world project.


Are you sure? It seems to work for me. MDN and caniuse agree: https://caniuse.com/mdn-css_properties_aspect-ratio




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: