livingston / css3-mediaqueries-js

CSS3 Media Queries Shim
http://code.google.com/p/css3-mediaqueries-js/
326 stars 200 forks source link

Don't works without "screen" in query #10

Open fspezi opened 11 years ago

fspezi commented 11 years ago

I discovered that "css3-mediaqueries" works only when the query contains "screen".

This query don't works:

@media (max-width: 460px) {
    ...
}

This query works properly:

@media screen and (max-width: 460px) {
    ...
}
livingston commented 11 years ago

Can you fork, patch and make a pull request, so that we can fix it?

joshua-chavanne commented 11 years ago

This was the most important thing I found here today!

knightdr commented 11 years ago

@joshua-chavanne

If you need an alternative to this project, try https://github.com/weblinc/media-match or https://github.com/paulirish/matchMedia.js

Good luck

joshua-chavanne commented 11 years ago

Thank you for the suggestion, but this unexpected behavior was the issue - css3-media-queries.js is working fine for my project for the time being, but I will check out those projects as well.