No subject

Mon Jan 28 08:41:14 PST 2013

srcset in its original flavor is much hated on due to the w/h specifiers being kind of mysterious. But I think all the numbers in the above could benefit from some sort of syntactic indicator that explains what they do. Even a "w" somewhere would be better than nothing.

Also, why is this width-only? To be fair, most pages scroll vertically, but for a horizontal-scrolling page I could imagine height being a much more relevant factor. It seems strangely asymmetric.

And finally, it seems like this syntax has no obvious way to specify the height in addition to the width, which is unfortunate because it means that the img element can't be sized for layout until the relevant selected image loads. You could apply a fixed height with style, but to get a different one based on breakpoints you have to resort to a bunch of CSS with media queries.

(2) Regarding media queries: Full media queries strike me as overpowered for the problem. Viewport-urls only handles width. And one could imagine maybe extending it to height. Why then does the art direction case need access to a query language with access to color depth, scan type, orientation, etc? Perhaps it should be reduced to the subset of media queries that are relevant to width/height. And perhaps that subset could be used as the breakpoint syntax

Now, I'm not saying my criticisms or suggestions here are necessarily correct after all due consideration. I'm just saying that the proposed individual syntax pieces may not be the only or best solutions to their respective problems.


More information about the webkit-dev mailing list