@media
block hacksThis page is designed to detect loop holes in a browsers CSS parser. I'm using it to see if it's possible to:
@media
blocks.@media
blocks that use media queries.@media
rules applied in this browser:@media\0 {…}
@media\9 {…}
@media screen\0 {…}
@media screen\9 {…}
@media \0screen {…}
@media \9screen {…}
@media \0screen,screen\0 {…}
@media \0screen,screen\9 {…}
@media \9screen,screen\0 {…}
@media \9screen,screen\9 {…}
@media \0screen\,screen\0 {…}
@media \0screen\,screen\9 {…}
@media \9screen\,screen\0 {…}
@media \9screen\,screen\9 {…}
@media screen and (min-width:0\0) {…}
@media screen and (min-width:0\9) {…}
@media screen and (min-width:640px), screen\0 {…}
@media screen and (min-width:640px), screen\9 {…}
@media screen\0, screen and (min-width:640px) {…}
@media screen\9, screen and (min-width:640px) {…}
@media screen { @media (min-width:640px) {…} }
@media screen and (min-width:0) { @media \0screen {…} }
@media screen and (min-width:0) { @media \9screen {…} }
@media screen and (min-width:0) { @media screen\0 {…} }
@media screen and (min-width:0) { @media screen\9 {…} }
Style rules defined in the following blocks will only be applied in IE, other browsers will ignore them.
Rule | IE 6 | IE 7 | IE 8 | IE 9 | IE 10 |
---|---|---|---|---|---|
@media screen\0 {…} |
No | No | Yes | Yes | Yes |
@media screen\9 {…} |
Yes | Yes | No | No | No |
@media \0screen {…} |
No | No | Yes | No | No |
@media \0screen\,screen\9 {…} |
Yes | Yes | Yes | No | No |
@media screen and (min-width:0\0) {…} |
No | No | No | Yes | Yes |
@media
query bypass filters for older IE browsersA bypass filter allows older versions of IE to ALWAYS apply style rules defined in
@media
blocks that use media queries. Browsers that support @media
queries
will continue to apply the rules as expected. This hack could be useful for mobile-first responsive
web design where "desktop" styles progressively are built up in @media
queries.
Rule | IE 6 | IE 7 | IE 8 | IE 9 | IE 10 |
---|---|---|---|---|---|
@media screen and (min-width: 640px), screen\9 {…} |
Yes | Yes | No | Uses MQ | Uses MQ |
You've probably noticed I haven't found an IE8 bypass filter yet - if you discover one please let me know via twitter.