The <resolution> CSS data type, used in media queries, denotes the granularity or possible fineness of detail of an output device. It is expressed as a <number> immediately followed by a unit of resolution (dpi, dpcm, …). Like for any CSS dimension, there is no space between the number and the unit abbreviation.
The resolution value specifies the display or print dot density per unit of distance. A “dot” is the finest level of detail that the device can display, such as a physical screen pixel or a dot of printed ink.
On screens, the resolution is calculated relative to CSS inches, centimeters or pixels, not to physical values. For media queries, if the resolution is different in the horizontal and vertical directions both values must match the media query.
Unlike the CSS <length> data type, the unit may not be omitted for the value 0: specifying a resolution of 0 is invalid and does not represent 0dpi, 0dpcm, nor 0dppx.
UnitsHere are some correct uses of <resolution> values:
96dpi
@media print and (min-resolution: 300dpi) { ... }
Here are some incorrect uses:
72 dpi
ten dpi
0
Related specifications
<resolution>
This article contains content originally from external sources, including ones licensed under the CC-BY-SA license.
Portions of this content copyright 2012 Mozilla Contributors. This article contains work licensed under the Creative Commons Attribution-Sharealike License v2.5 or later. The original work is available at Mozilla Developer Network: Article
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4