Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

ie9+ don't support matchMedia #57

Closed
paulirish opened this Issue · 4 comments

3 participants

@paulirish
Collaborator

but your readme says so

:)

@scottjehl scottjehl closed this in e27112a
@curtisj44

Way late to the party, but... doesn't this mean the logic for respond.mediaQueriesSupported doesn't work as expected because IE9 supports media queries, but not window.matchMedia?

@scottjehl
Owner

No, matchMedia is just used as an immediate flag for mq support. If it's not there, mqs are manually tested.

@scottjehl
Owner

A better explanation, the matchMedia polyfill is included to normalize that. Then the following can determine native CSS3 Media Queries support:

respond.mediaQueriesSupported   = win.matchMedia && win.matchMedia( "only all" ).matches;

only is a media query function, and all is a general media type supported everywhere, so they can be combined to query for mq support in general.

@curtisj44

I think I understand now. I had thought I was including a matchMedia polyfill via Modernizr, which it turns out wasn't there. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.