Media query tests - device-pixel-ratio

Back to index.

Apple documentation.

The device-pixel-ratio media query mirrors the window.devicePixelRatio property, which gives the number of physical pixels divided by the number of dips. See my blog post for an explanation.

Basic

Equality

As far as I’m concerned the ratio that’s being used by some browsers is the incorrect unit for device-pixel-ratio, because the value should be exactly equal to window.devicePixelRatio.

Units

Values