unit
dppx — CSS reference
Dots per CSS pixel; 2dppx describes twice the device-pixel density relative to CSS pixels. Resolution describes density relative to CSS units, not necessarily the physical density printed on the device. Zoom and device settings can affect media-query results. Prefer ranges such as min-resolution when exact equality is unnecessary.
Formal Syntax & Structure
css syntaxcss
@media (resolution: 1dppx) { /* rules */ }Working Example
Example Snippetcss
<!doctype html><html lang="en"><meta charset="utf-8"><title>Numeric dimension lab</title><style>body {margin:0} .sample {height:12px;background:#006050}#a {background:#ececec} @media (resolution: 1dppx) {#a {background:#d4e9ef}}</style><body><p id="a">Density-specific style</p></body></html>