question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support for "\0" media query reference (IE8 - 10)

See original GitHub issue

@media screen and (min-width:0\0) & @media screen\0

Produces a syntax error, however, it’s a valid media query usage for targeting IE9 and IE10. (http://www.impressivewebs.com/ie10-css-hacks/)

Also, http://blog.keithclark.co.uk/wp-content/uploads/2012/11/ie-media-block-tests.php

Is there a work around for this or did I miss a fix/method on how to make this work?

Thanks, J

Issue Analytics

  • State:closed
  • Created 10 years ago
  • Comments:18 (12 by maintainers)

github_iconTop GitHub Comments

2reactions
radium-vcommented, Sep 11, 2013

This works:

@ie6-7: screen\9;
@ie8: \0screen;
@oldIE: ~"@{ie8}\,@{ie6-7}";
@ie9-10: ~"screen and (min-width:0\0)";
@mobile: ~"screen and (min-width: 640px)";
@mobile-with-oldIE: @mobile, @ie6-7;

@media @oldIE {}
@media @ie8 {}
@media @ie9-10 {}
@media @mobile, @ie6-7 {}

Outputs:

@media \0screen\,screen\9 {
}
@media \0screen {
}
@media screen and (min-width:0\0) {
}
@media screen and (min-width: 640px), screen\9 {
}
@media screen and (min-width: 640px), screen\9 {
}
0reactions
seven-phases-maxcommented, Feb 25, 2016

Merging to #2207.

Read more comments on GitHub >

github_iconTop Results From Across the Web

IE7, IE8 support for css3 media query [duplicate]
Internet Explorer 8 or older doesn't support media query. You can use media-queries.js or respond.js to add media query support in IE.
Read more >
"media" | Can I use... Support tables for HTML5, CSS3, etc
Allows a media query to be set based on the presence and accuracy of the user's pointing device, and whether they have the...
Read more >
media - CSS: Cascading Style Sheets - MDN Web Docs
The @media CSS at-rule can be used to apply part of a style sheet based on the result of one or more media...
Read more >
Logic in CSS Media Queries (If / Else / And / Or / Not)
I m using this media query. this is not working up to max-width:1365px. it works till 1224px only. help me!!!
Read more >
CSS Media Queries Examples
Tip: A more modern way of creating column layouts, is to use CSS Flexbox (see example below). However, it is not supported in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found