Game Development Reference
In-Depth Information
@media all and (device-aspect-ratio: 1/1) {
h1 {
color: green;
border: 1px solid green;
padding: 20;
}
}
color
This media query attribute checks for the number of bits per color component used
by the output device. For example, if the output device uses an 8-bit color system,
where it uses 2 bits to represent the red, green, blue, and alpha components, then
the color attribute in the media query expression is 2. The min and max modifiers
can also be used to test for this as well.
@media all and (color: 2) {
h1 {
color: green;
border: 1px solid green;
padding: 20;
}
}
If the output device is not a color device then the value of the color attribute will be
zero.
@media all and (color: 0) {
h1 {
color: green;
border: 1px solid green;
padding: 20;
}
}
// This query produces the exact same result as
the previous one
Search WWH ::




Custom Search