4 ms·
I agree that srcset has its advantages, and like I said in the post, I expect that it will make a fine solution in the long-run, and I'm glad this problem is be
by bsatrom 14y ago
I agree that srcset has its advantages, and like I said in the post, I expect that it will make a fine solution in the long-run, and I'm glad this problem is being addressed.
One minor point, however, is that the strawman <picture> proposal was meant to be equally backward compatible through the use of a child <img> tag that would only display in unsupported browsers, as <video> works today:
<picture alt="cool-image">
<source src=hires.png media="max-width:1920px">
<source src=midres.png media="min-width:800px">
<source src=lores.png>
<!-- fallback for browsers without support -->
<img src=midres.png alt="cool-image">
</picture>
- jcampbell1 14y agoThat is not nearly as backwards compatible because you are adding markup. Will the picture element inherit it's style from the inner img element? I don't think so. Now you have to go mess around with the CSS and have two different pathways for the style to be applied based on the browser. Also, <video> fallback doesn't really work. If you have an h264 video, there is no good way to make it play in all browsers with markup alone (Firefox won't fallback to flash).
- bsatrom 14y agoI don't disagree at all. Like I said in the post, srcset will one day make a fine solution and given the right input, might even end up being developer-friendly. I hope that ends up being the case, because the current syntax is cryptic and vague.