Moving into media features
As we said in the last lecture, there is a shift in the way CSS is going to be managing media types with a long term goal to get rid of media types all together and focus on media features. Although the list of features is far from final at this stage it can help us understand how to get ready for the future.
Keynotes:
- Focusing Shifting to Media Features.
- Screen/Device dimensions media features.
- Display Quality features
- Color media features
- Environment media features (light-level)
- Scripting Media Features(scripting)
Properties:
responsive design, future of media queries, css4, media featuresVideo Transcript
00:00As promised in the last lecture, let's jump right into it. We have a lot to cover.
00:05So we're talking about that there's this big shift in CSS4 to move into media features and a way for media types.
00:14Literally listing out the different features and that's literally what we're gonna do right now.
00:18Now a big, big disclaimer. Everything we say right now is bound to change. It's a really early draft.
00:25We're talking about something that probably will be implemented only five, six, seven years from now.
00:30So let's jump right into it. So we're saying we're focusing our shift to media features. We already said that.
00:36And we're... what type of features? Let's list them out.
00:40We have your screen and device dimension, media features. You have your display quality, media features.
00:46The color media features. The environment media features. The scripting media features.
00:51Okay, so that's the cluster really. There's one more of interactive media features that I forgot to list out.
00:57But we're gonna talk about that really shortly.
00:59So there's a group of types of media features and there might be more. Some might be dropped.
01:05Let's go ahead and go item by item and see what changed in it and what's really inside of it.
01:11So how about we start from the things that are not changing.
01:15The things that are not changing are the screen device related parameters.
01:19And if you're asking yourself, what are the screen device parameters?
01:23That's the width and the height and the aspect ratio and the orientation.
01:27Both for the screen itself or for the device itself.
01:31Such as device width, device height, device aspect ratio or device orientation.
01:37Now what's next? So what else is not changing?
01:42All the color media features are not changing and we've seen them already in our course.
01:46And we started that we haven't really found anyone that's really implementing them.
01:50But that's probably gonna change or at least the people behind CSS believe that it will change.
01:56So we should expect to see new devices that are gonna start listing out their color features.
02:01If it's that index, color index or monochrome to know if it's a different type of device that has a color range that is great.
02:12Alright, so really what we're talking about in all the rest, there isn't anything that was dropped, at least currently.
02:18And we're really mainly talking about additions.
02:20So let's go through all the different items and see what is added or what is expected to be added from a feature level.
02:26Not necessarily from how to do it because that is bound to change as well.
02:30Alright, so the first, let's talk about the display quality features.
02:34Some of them you know already. Scan, Grid, which enabled us to get a little bit more information
02:40about the capabilities of that specific display monitor.
02:44What other things could we expect for?
02:47One is resolution. There's a lot of different devices out there today with a lot of different resolutions.
02:53So there's bound to be a media feature that is focused on resolution.
02:57And you can see here an example of implementation where we would say that we'll only do this if it's a resolution of at least 300 dpi.
03:06Now, not clear exactly if this is the final. There might be different variations of it, such as different printers.
03:13So maybe if it's a printer that could print out really, really sharply or a printer that prints out in black and white,
03:19we'll have the capability of defining the different styling based on the different types of printers and the different types of screens.
03:25So this is really exciting.
03:27The next thing is update frequency.
03:29And you might ask yourself, what is the update frequency itself?
03:33And the update frequency basically is the most of the web that we know today is displayed and it refreshes automatically.
03:41The browser that you're looking in if you're watching this course through a browser is automatically refreshing all the time,
03:46updating elements as they need to be updated.
03:49Contrary to that, if you take a printed item, well, a printed item has no refreshes. It's final.
03:55So when we're saying none, really, in many ways we're saying, hey, this is an item that will never change.
03:59Once it's changed, it's done.
04:01And you kind of get a hint here where maybe in the future print won't be needed either,
04:05because if we say that it doesn't get updated ever and we also have the resolution, we could create an output that would be fitting for it.
04:11Although print is maybe will stay forever because we kind of want to know if it's going to be on a piece of paper or not,
04:17if it's going to be on a screen or a piece of paper in many ways that is a feature.
04:22So what is slow and what devices have slow rendering?
04:25Slow rendering is when you're talking about e-ink devices or really slow devices,
04:31such as maybe there'll be a device for your refrigerator that is running a browser that is web-connected.
04:37It doesn't really have the same capabilities as your mobile phone or as your normal device.
04:42And this really goes down to your normal, where normal will be update rates that is expected to be normal,
04:47giving you a lot more control over deciding how much you want to do.
04:51And we're talking about slow, we're mainly talking about animation and how fast would be the rendering of animation.
04:57All right, let's look at other display quality features.
05:01One more is overflow block, and this is really interesting.
05:04And I want you to ignore the name because there is a rumor out there that the name might change because it's a little bit confusing.
05:11The overflow block really describes how does content that flows out of the visible range of the page act.
05:20If it says none, if the overflow block is none, it means that there is no way for the user to reach this information.
05:27An example of that might be a billboard or if something that the user does not have interactivity,
05:33maybe it's one of those cabs that the user could watch the content,
05:36but the user, the display is not a touchable display and there's no mouse there,
05:41and there's no way for the user to engage with it.
05:43It enables us to say, hey, if there's an overflow none, then we'll do one design.
05:47But if the scroll is available, which basically every computer could scroll,
05:51then we would have the page that is scrolling that we would want.
05:55Another option is optional page.
05:57An optional page is really something that is like pages.
06:01So let's first explain pages.
06:03Page is like what you would print out in a printer or an ebook where you press on a button to refresh the screen
06:10to move on to the next page.
06:12It does not scroll.
06:13So the content is visible, but it's visible in a different way than it would be if with a normal scroll.
06:19Optional page is really mainly used for presentations or slides
06:23where someone configures where that break point would be.
06:28And it's somewhat more computerized in many ways or someone more,
06:32it's something you would see on a computer such as maybe a slideshow
06:35or something at that level where the user would define it.
06:37So it might be optional page, which means that if you didn't make a page,
06:42then it doesn't scroll and the content in that page is not visible, probably.
06:46Might be there's a good question there.
06:48Could there be a possibility where it's an optional page and it also scrolls?
06:52Right now there is no specification about that and we don't know if there are devices of that capability
06:57or that need is even needed.
06:59So let's look at another name.
07:00We talked about overflow block, but there's one more that is a little bit weird,
07:04which is called overflow inline and I believe that these names are probably going to change.
07:10Overflow block is about the whole, whole site, the whole experience.
07:15The overflow inline contrary to that is when there are scrolling elements
07:19inside of a box area on the screen.
07:22Are they scrollable or not?
07:24Could the device scroll it or not?
07:27And that really it doesn't have as many options here because it's really just between
07:32or you could or you can't scroll those elements.
07:35So those are the display quality features.
07:37We really ran through all of them and maybe there'll be more and maybe some names will change.
07:41There is a possibility of that.
07:43So make sure the names don't really matter right now.
07:45Don't implement it.
07:46This is really about you understanding the future of what could we expect with display quality features.
07:52All right.
07:52So let's move on to the next one and now we're going to focus on interaction media features
07:56that are not really available yet for none of us.
07:59Now let's see.
08:00Let's see what we have here.
08:01So one is a pointer and I want to go through and show both the pointer and the hover at the same time.
08:06It could get a little bit confusing.
08:09Basically a pointer enables us to point at something.
08:13Could we point?
08:14None would be that we can't.
08:16Course would say that we have control but it's not very fine.
08:22Or we have fine control such as a mouse that is really really easy to easily control
08:27and move around contrary to maybe a touch screen where you do have control but it's not as fine.
08:32You're not as accurate.
08:34Hover on the other hand focuses on another segment which basically says could you hover around without pressing.
08:41Now on a mobile device you don't really have a hovering capability.
08:44On a mouse you do.
08:45So it's really just a question of between none to on demand to hover
08:50where sometimes some devices enable you to hover but not all the time.
08:53While a mouse is always hoverable you're always hovering over something.
08:57While none is that you just don't have any capability to hover at all.
09:01Now there's a few features here also for your I just want to kind of make it more clear.
09:06So a mouse for example both hovers and has a fine pointer.
09:10Contrary to that a touch screen has no hovering capabilities and a coarse pointer.
09:16All right.
09:17Now there's one more feature here that might be available that will be available probably
09:21which is any pointer and any hover that accepts the same parameters as pointer and hover.
09:26The only difference is that it's not specific to the current user's controlled device
09:31but any pointer that the user has any hover that the user has.
09:35So if the user has a touch screen and a mouse then it's going to these rules are going to probably be more
09:41if you're going to see fine and the user right now is using their screen
09:45then if you're working with the hover then maybe there wouldn't be a hover.
09:49But when you're using with a any hover then it would accept it
09:53because we know that the user also has a mouse so we know that the user could use it.
09:57And that's really the fine difference between those interaction media features.
10:02So let's continue on environment media features.
10:05Now the environment media features really currently there's only one of them which is the light level.
10:10And I love it and it's bound to change because Microsoft has another specification that they've been working on
10:16so there's a good chance that this is going to change and adjust.
10:19But the idea behind it is very simple is that to be able to give CSS information about what environment is the user in.
10:26Is it a dimly lit environment? Is it a normally lit environment?
10:30Or is the place washed with light?
10:32Enabling us to create a site that adopts to the user's environment
10:36making sure that if you're in a very bright area put a lot of dark colors.
10:40If you're in a very dark area or vice versa I don't really know which whatever is more fitting
10:45maybe in a dark area you're going to use less light.
10:47In a light area you're going to use a lot more light a lot more contrast to make sure that it's much more visible.
10:53So that's the light level and we're ready for one last item to talk about which is scripting media features
11:00which is really again there's only one of them currently.
11:03And this one is really just to enable us to know does is there scripting capabilities on this browser
11:09where none says there just isn't any scripting when we're really talking about JavaScript.
11:14Initial only basically says that there is the feature but it's disabled
11:20and enabled means that it's enabled.
11:22Now it's not clear maybe initial only will never be there.
11:25One of the comments in the current draft is asking well is it really relevant to know if there is scripting
11:30if the user decided not to put in.
11:32There's probably is because maybe we would want to put some sort of highlight some sort of CSS
11:37some sort of script that would tell the user please turn on your JavaScript more easily
11:41but we never know this could change absolutely could change and many more features could be added.
11:46So we talked about all the media features that we know about currently in late 2015
11:51that are probably going to be added into CSS at some point and you're really up to date about it.
11:56What are we going to talk about in the next lecture.
11:58Well the next lecture we're going to be talking about the creation of custom media queries in CSS for.
12:05So I hope to see you in the next lecture where we'll start talking about the possibility of creating
12:09creating custom media queries.
