2 ms·
Media query syntax has been proposed: <picture><source media="min-resolution: 2ppx"></picture> but mere query doesn't affect intrinsic size of the image, s
by pornel 13y ago
Media query syntax has been proposed:
<picture><source media="min-resolution: 2ppx"></picture>
but mere query doesn't affect intrinsic size of the image, so you'd also need to specify exact dimensions in the markup or something like:
<picture>
<source media="min-resolution: 2dppx" style="image-resolution: 2dppx">
</picture>
which is rather verbose and error-prone compared to srcset.
> Other than 1x and 2x what are we supposed to expect to use here with this? Is there going to be 4x?
I don't think so (meaning of "1x" gradually changed from 72dpi to 100-130dpi, so I expect "2x" similarly gradually increase) and I proposed that new image embedding methods default to @2x, but that idea hasn't gained support from CSS/HTML WGs.
- Kequc 13y agoIt could assume you are defining image dimensions in the stylesheet the way that normal image tags do. Or it can default to the image scaled down to 2ppx as defined in the media query. Your example looks similar to current audio tags. <audio controls> <source src="horse.ogg" type="audio/ogg"> <source src="horse.mp3" type="audio/mpeg"> Your browser does not support the audio element. </audio>