From the course: Advanced CSS Media Queries

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Testing for monochrome devices

Testing for monochrome devices - CSS Tutorial

From the course: Advanced CSS Media Queries

Start my 1-month free trial

Testing for monochrome devices

- [Instructor] These days, most of our devices are in color. However, on occasion you might want to target a monochrome device and you can do that using media queries. There's not a whole lot of monochrome devices out there these days. And it's actually going to be pretty hard for me to show you how a monochrome media query would work on a color device. But let me go ahead and write you a media query so you know what the code looks like, even though it's going to do absolutely nothing. So if I said something like @media, we'd simply test for our monochrome, just like that. And then we could write a style. Let's say we'll just change our body to a background color of black and a color of white. So if it were true that my screen were black and white, well, then I would see something that looked black and white just like that. The browser actually did test to see if this was true and it turns out it's not so the styling gets…

Contents