3 ms·
CSS px unit is not device pixel anymore. In this context 2x does not mean that the image is twice as big in px but that it should be used if the device pixel/px
by cgrand-net 13y ago
CSS px unit is not device pixel anymore. In this context 2x does not mean that the image is twice as big in px but that it should be used if the device pixel/px ratio is >=2
- grey-area 13y agoWhere did I make that assumption? Concentrating on device resolution ignores many of the other bits of information a browser has when deciding which images to load. What happens when the device pixel ration is < 2, but the device is zoomed on the web page? What about slow connections on retina devices, or users who prefer to load things faster by getting lores images (something specifically called out in the spec)? Or some new browser which gets incredible first page render speeds by loading thumbnails of all images, and only loading hires images for those displayed? Or scripts which want to enumerate images and choose a certain resolution, independent of the intended display size? This proposal is just making life easier for browser makers who want to cater for 2 resolutions in a hurry (ipad Retina, iPad), not for the people reading pages or creating them, and it puts the decision as to which image to render in the wrong place anyway IMHO. That should be a browser decision, based on data in the HTML.