unit
x — CSS reference
The x unit is an alias for dppx in resolution values. 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: 1x) { /* 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: 1x) {#a {background:#d4e9ef}}</style><body><p id="a">Density-specific style</p></body></html>