02Geek HTML5 and JavaScript, TypeScript, React, Flash, ActionScript online School
Previous Video
Chapter is concluded.Next is

Working with media queries ranges

until now when you wanted to define a range you had to use the min and max parameters but in CSS4 there is a good chance that ranges will be introduced. By the end of this lecture, you will be familiar with it.

Keynotes:

  • the min and max are still here (but might be deprecated over time)
  • the range operators.
  • Final thoughts.

Properties:

responsive design,media ranges

Video Transcript

00:00And we are in our last lecture in this conversation about CSS4 media queries.
00:06So what are we going to talk about in this lecture?
00:08We're going to talk about media query ranges, which you're familiar with already.
00:12If you've been following our course in general, using the min and max,
00:16you could already create ranges and work with ranges already right away.
00:20In CSS4, it's really just a matter of cleaning things up.
00:23So instead of using the min and max or on top of it, at least currently,
00:28they're throwing in the capability of using mathematical operators
00:31that enable us to define if it's a greater, less, or greater, or equal,
00:35less, or great, or equal to very, very wonderful, I think,
00:39and one of my favorite features.
00:41So let's look at a really simple example where here,
00:44instead of setting the min width to be 100,
00:46I'm literally saying that the width must be above 100.
00:50Or in the next rule, I'm saying the minimum width, the opposite.
00:53I'm saying the width must be equal or smaller to 100 pixels.
00:59And another example, which I think is wildly cool,
01:02is that this media query says, if our width is between 100 to 200 pixels,
01:06including 100 and including 200 pixels.
01:10And that's really, in essence, I love this.
01:12It's one of my favorite new features that really just makes things really clean.
01:16And I hope that they'll be implemented very soon.
01:19And in the future, we'll use it because it's just really easy to write.
01:22It's just less writing.
01:24Very intuitive, I think.
01:26And with that said, that really covers this section.
01:29And we're done talking about CSS4.
01:32And we're done, really.
01:33And a few just final words before I really say goodbye is,
01:36there is also some scripting capabilities that we're not even getting into
01:40because it's really far into the future.
01:43And also, our core focuses CSS in this course.
01:46But there is also will be probably a library
01:49that will enable us to control these media queries through JavaScript as well.
01:53So with that said, thank you so much for watching this section.
01:57And I hope to see you very, very soon.

Ready to Level Up Your Skills?

Join thousands of learners on 02GEEK and start your journey to becoming a coding expert today!

Enroll Now for Free!