News for hackers. Stuff that matters.
Re:State of CSS by dheera on Friday October 21, 2022 @01:16PM (#33290544)
Yet 15 years later, I still can't specify a width and aspect ratio for an div without some unintuitive nested div hell.
Re:State of CSS by nailer on Friday October 21, 2022 @01:28PM (#33290687)
Re:State of CSS by partiallypro on Friday October 21, 2022 @07:10PM (#33293926)
Experimental on Safari, so it's unusable of you have a real world project.
Re:State of CSS by TheAngush on Friday October 21, 2022 @10:32PM (#33295170)
Are you sure? It seems to work for me. MDN and caniuse agree: https://caniuse.com/mdn-css_properties_aspect-ratio
Re:State of CSS by LukeLambert on Friday October 21, 2022 @02:08PM (#33291148)

  div {
    width: 640px;
    aspect-ratio: 16 / 9;
  }
Re:State of CSS by dheera on Friday October 21, 2022 @06:16PM (#33293577)
> 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.

Re:State of CSS by TheAngush on Friday October 21, 2022 @10:30PM (#33295165)
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.