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 comma-separated conditions (or)

Testing for comma-separated conditions (or) - CSS Tutorial

From the course: Advanced CSS Media Queries

Start my 1-month free trial

Testing for comma-separated conditions (or)

- For those of you with some programming background we have discussed the operators and and not. Therefore I'm sure you're thinking there must be an or in there somewhere. Right? Well, in fact there is an or in there but we don't use the word or. We're going to use comma separated values to indicate separate items that should be evaluated individually as if it were an or statement. Little confusing to those of you who have a programming background and why we went to commas instead of the word or I'm not entirely sure but I don't write the rules. Let's go ahead and take a look at how this is going to work. So for example, let's say I have a media query for the screen and if the orientation is portrait. Let's just do that much to start with and we'll say that the articles are going to have a background color of black and a text color of white. So that's going to apply to my screen immediately because right now…

Contents