CSS Media Queries for Retina and Non Retina Screens
Although this works only for WebKit based browsers, this is helpful:
There are two types of pixels in the display. One is the logical pixels and the other is the physical pixels. Mostly, the physical pixels always stay the same, because it is the same for all the display devices. The logical pixels change based on the resolution of the devices to display higher quality pixels. The device pixel ratio is the ratio between physical pixels and logical pixels. For instance, the MacBook Pro Retina, iPhone 4 and above report a device pixel ratio of 2, because the physical linear resolution is double the logical resolution.
The reason why this works only with WebKit based browsers is because of
- The vendor prefix -webkit- before the rule.
- This hasn't been implemented in engines other than WebKit and Blink