CSS Master

(Primo) #1

Table 7.2. Range media feature types that can be used with the min- and


max- prefixes.


Property Description Value type
ratio (such as 1024/768 or
16:9)

aspect-ratio The ratio of width to height

ratio (such as 1024/768 or
16:9)

The ratio of the
device-width to
device-height

device-aspect-ratioa

Number of bits per color integer
component of the device; 0

color

when the device is not a color
device
Minimum number of colors integer
available on the device

color-index

Height of the viewport or page length
box

height

Height of the screen, or page length
sheet size in the case of printed
media

device-heightb

Number of bits per pixel in a integer
monochrome frame buffer

monochrome

resolution (dpi, dpcm, and
dppx) unitsd

Describes the pixel density of a
device

resolutionc

Width of the viewport or page length
box

width

Width of the screen, or page length
sheet size in the case of printed
media

device-width

aThisisdeprecatedintheMediaQueriesLevel 4 specification.Thoughwidelysupportedbybrowsers,
thesepropertiesaresubjecttoremoval.Avoidusingtheminnewstylesheets,andconsiderupdating
theminoldones.
bDeprecatedintheMediaQueriesLevel 4 specification.Thoughwidelysupportedbybrowsers,these
propertiesaresubjecttoremoval.Avoidusingtheminnewstylesheets,andconsiderupdatingthemin
oldones.
c Safari ≤ 9, Android ≤ 4.3, UC Browser ≤ 9, and BlackBerry Browser ≤ 10 use the non-standard, vendor-


prefixed -webkit-device-pixel-ratioinsteadofresolution


Applying CSS Conditionally 283

Free download pdf