Media Query operators
you already know how to work with the not, only and and operators but is there any new operators around. You guessed right there is a high likelihood that a new operator will be introduced the 'or' operator.
Keynotes:
- Media query operators
- only, not and and.
- The or operator.
properties:
responsive design,operators, or, and , only, not , allVideo Transcript
00:00Let's explore another feature which is all about operators.
00:05Now, this is a really short lecture.
00:06Let's just jump right into it.
00:08Operators in CSS3 and the world that we live in today
00:12has only not, and also the end parameter.
00:16That remains the same, nothing is changing there,
00:18and only one new parameter, at least right now,
00:20is going to be added, and a very logical one to have,
00:23which is the OR operator.
00:25Now, how do you work with the OR operator
00:27is really intuitive in many ways,
00:30but let's take a look-see.
00:32The OR operator enables us to define a screen or print,
00:35and in this case, we're saying
00:37if the media is screen or print,
00:39but we could use it also in a much more complex scenarios
00:44where we wanna have some differences
00:45of if it's in this size or it's that size,
00:47and it could be multiple ones,
00:49and it's just like with the end command
00:51that enables us to mix and match and create stuff,
00:53the OR can open up a lot more possibilities,
00:56really on a level of aesthetics
00:58of writing less than doing more.
01:00Now, everything you could do with OR you could do today
01:02will just take you more code most of the time,
01:05and this really simple example, already today,
01:07we could just use screen, comma, and then the print,
01:10and list out all the different rules that way,
01:13but if we had there a really long line
01:15that was using an OR, it would take us a lot more CSS
01:19to rewrite the exact same thing
01:21that we could have done with just a simple OR,
01:23and that's it, that's what's the newest operator
01:27is likely to be added at some point into CSS,
01:31in the CSS future, CSS4 world
01:34that we're bound to get into at some point soon.
01:36In the next lecture, we're gonna be talking about
01:38working with media query ranges,
01:40and although you've been working with ranges so far
01:43in CSS3, CSS4 is really just making some tweaks
01:47to make it easier to rate it faster,
01:49and I love it, I really do.
01:51So we'll see in the next lecture when we explore that.
