Browser.screen resolution

From MozillaZine Knowledge Base
Jump to navigationJump to search

Background

CSS can use a variety of units for specifying dimensions. These units are classified as either absolute or relative. Absolute units (inches, centimeters, millimeters, points, and picas) are intended for use when the final output medium is of known dimensions; for example, in a print stylesheet. When they are used onscreen, their actual values must be calculated based on the DPI of the screen.

This preference used to determine what DPI should be used for calculating the dimensions of elements set using absolute width units. It is now replaced by browser.display.screen_resolution in Gecko 1.8.0.x (the rendering engine for Firefox 1.5.0.x) and layout.css.dpi in Gecko 1.8.1 and 1.9 (i.e., the rendering engines for Firefox 2.0 and 3.0).

Possible values and their effects

-1

Use the host system’s logical resolution or 96, whichever is greater, for interpreting dimensions specified in absolute units. (Default)

0

Use the host system’s logical resolution for interpreting dimensions specified in absolute units. This is the value used when the 'Display resolution' is set to 'System setting.'

(any positive integer)

Use this number for interpreting dimensions specified in absolute units.

Caveats

  • This preference is not meant as a general “zoom” feature to scale all rendered web content.
  • This preference has no effect in Windows (the OS’s DPI setting is queried directly).

UI

Mozilla Suite

“Edit → Preferences → Appearance → Fonts → Display resolution”

Mozilla Firefox 1.0.x

“Edit → Preferences → General → Fonts&Colors → Display Resolution” (non-Windows only)

First checked in

1998-11-06 by troy

Has an effect in

  • Mozilla Firefox (all non-Windows versions up to 1.0.x)
  • Mozilla Thunderbird (all non-Windows versions up to 1.0.x)

Related bugs

Related preferences

External links