<resolution>

A media query property that describes the pixel density of the output device (like a 'Retina' display). It allows you to provide higher-quality images only for screens that can actually see the difference.

Quick example

@media (min-resolution: 2dppx) {
  /* Styles applied only to high-density/Retina displays */
  .icon {
    background-image: url('icon-2x.png');
  }
}

All units

Resolution units

Used in media queries and the image-resolution property to target screens by pixel density.

UnitMeasuresNotesBaseline
dpiDots per inchStandard print density unit. 96dpi = 1dppx.Widely
dpcmDots per centimeterMetric counterpart to dpi. Rarely used.Widely
dppxDots per CSS pixelMost useful on the web. 1dppx = standard density, 2dppx = Retina.Widely
xAlias for dppxShorthand. 2x is the same as 2dppx.Widely

<resolution> Browser Support

Widely availableSince 202295% global usage

This feature is well established and works across many devices and browser versions. It has been available across browsers since 2022.

Safe to use without fallbacks.

29+
8+
16+
12+
ESC