Questions tagged [devicepixelratio]
33 questions
0
votes
1 answer
CSS equivalent to srcset (x-descriptors) for both iPhones and Android phones
I have the following declaration in my html page.
An x-descriptor with both 2x and 3x defined. I want to create a css equivalent so that…


DaveK
- 544
- 1
- 6
- 16
0
votes
0 answers
DevicePixelRatio appears to be suddenly stacking with windows scale
I have recently added DPI scaling to a project to ensure the UI elements in the project (drawn with canvas) are a reasonably consistent size across devices. This seemed to work at first, but a day after adding the code, I am suddenly getting massive…

Thomas Bouffard
- 61
- 1
- 5
0
votes
0 answers
why 1px seems larger on retina display?
I encountered this issue the 1px border looks 2px on retina display, I know it's something related to devicePixelRatio, but still don't get WHY.
And if 1px looks 2px on retina display with a devicePixelRatio of 2, why the 200px*200px image doesn't…

Blake
- 7,367
- 19
- 54
- 80