News for hackers. Stuff that matters.
Re:Avoiding image layout shifts (CLS): aspect-ratio vs. widt... by Vanderson on Monday July 11, 2022 @04:30PM (#32061391)
I think you are agreeing with the article, but the details are different. I like how he distinguishes between specific use case, user generated content, or part of the site design.

> So, which method should we use?

> We've got one solution, aspect-ratio, which is CSS-based. And the other solution, presentational hinting, which uses width and height attributes. The question is very similar to "should this image be a <img> or a CSS background-image?" and the answer is the same: Is it content or design?

There are no comments on this comment yet.