More than just screen size What else could we respond to?
Slide 58
What type of pointer do I have?
Slide 59
@media (pointer:coarse) { .pointer::before { content: “You have a coarse pointer”; } } @media (pointer:fine) { .pointer::before { content: “You have a fine pointer”; } }
Slide 60
Can I hover?
Slide 61
@media (hover) { .can-i-hover::after { content: “You look like you can hover.”; } } @media
(hover:none) {
.can-i-hover::after { content: “I don’t think you can hover.”; } }
Slide 62
@media (any-pointer:coarse) { .any-pointer::before { content: “One of your pointers is coarse. Yo ur device has a touchscreen, though you might not be using it.”; } }
Slide 63
Slide 64
“
Designing a page that relies on hovering or accurate pointing only because any-hover or any-pointer indicate that at least one of the available input mechanisms has these capabilities is likely to result in a poor experience.
”
Media Queries Level 4 https://drafts.csswg.org/mediaqueries-4/#any-input
Slide 65
Testing capabilities Check for screen size, but also pointer type and hover ability to understand the environment your site is being used in.
Slide 66
Overflow detection Display Quality Media Queries
Slide 67
@media (overflow-block: paged) { /* CSS for paged media */ }
Slide 68
Responding to the wishes of the visitor Media Queries Level 5 and User Preference Media Features