Browser.display.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 determines what DPI should be used for calculating the dimensions of elements set using absolute width units. It replaced browser.screen_resolution in Gecko 1.7.x (the rendering engine for Firefox 1.0.x) and is replaced by 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 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).
  • In Mozilla Firefox 1.5, the preference’s default (96) overrides the system setting (bug 323962)

UI

Mozilla Suite

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

Mozilla Firefox 1.5

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

First checked in

2000-05-17 by Chris McAfee

Has an effect in

  • Netscape (all non-Windows versions since 6.0)
  • Mozilla Suite (all non-Windows versions since M16)
  • Mozilla Firefox (all non-Windows versions of 1.5.0.x)
  • Mozilla Thunderbird (all non-Windows versions of 1.5.0.x)
  • SeaMonkey (all non-Windows versions of 1.0.x)

Related bugs

Related preferences

External links