Game Development Reference
In-Depth Information
@media all and (min-color: 1) {
h1 {
color: green;
border: 1px solid green;
padding: 20;
}
}
In some instances, where the output device uses different bit counts per color com-
ponent, the color attribute refers to the smallest value of bits per component. For ex-
ample, if the output device uses an 8-bit color system and it uses 3 bits for the red
component, 3 for the green component, and 2 for the blue component then the value
used as the color attribute for the media query will be 2.
color-index
The color-index attribute returns the number of colors used by the output device.
For example, a device with 256 colors would match the following media query ex-
actly:
@media all and (color-index: 256) {
h1 {
color: green;
border: 1px solid green;
padding: 20;
}
}
As with the color attribute, values specified for the color-index attribute cannot be
negative. Also, if the output device does not use a color lookup table, the value for
color-index is zero.
monochrome
If an output device is monochrome, this media query attribute refers to the number of
bits per pixel used by device. This is similar to color, but only applies to monochrome
Search WWH ::




Custom Search