On Wed, May 22, 2013 at 4:18 PM, David Hucklesby <huckle...@gmail.com> wrote: > But why would you do that? (Use "@media" on its own, that is.)
Another good question! :D I left out a critical piece of info: <https://github.com/himedlooff/media-query-to-type> Long story short, that's a LESS concept/technique where one uses variable overrides for the @media XXXXXXX part, thus allowing old IEs to load desktop styles (by using an IE-specific stylesheet link in head). If you read the README, it should be pretty self explanatory. If you read through that issue I linked to, I talk about how my first idea was to use an empty string for the override which would make all media queries look like: @media { .. } That would the cleanest solution IMHO; unfortunately, based on my cursory tests, IE8 won't load styles within that type of simple "at-rule" (thanks for the clarification on the terminology). Once I realized IE 8 was having issues, I tried both "screen" and "all"; both of which appear to work (that is, old IEs load all styles within said MQs). > Then again, "@media screen," "@media print," and "@media all" on their own > are > not media queries. These are called "at-rules" and have been around for a > long > time. Again, thanks for the clarification on the terminology. :) I had assumed @media was considered to be a media query. Shows what I know. :D I guess it's because I don't use "at-rules" outside of the context of a media query, so that's why I assumed the term "media query" would apply. So, technically speaking then, all media querys are also "at-rules", but not all "at-rules" are media queries. Got it! :) > Both "@media screen" and "@media all" apply to screen displays in all > browsers, not just IE (of any flavor). Agreed. :) > For media queries and other CSS3 support questions, you may find this link > useful (despite its name :-) - > <http://html5please.com> Thanks for link! I could not find anything under "@", "@media" or "media query". Checking here: http://caniuse.com/#search=@media Interestingly enough, the result that shows is labled "media query"! FAIL! (Hehe, just kidding). :) I suppose the caniuse site is just listing CSS3 stuff. Searching Google for "at-rule" is yielding some good results though. Again, thanks for the terminology clarification. :D <http://www.htmldog.com/guides/css/advanced/atrules/> So, based on the info on the above page, it looks like @media screen, print, projection, handheld, and all (or a comma-separated list of more than one) will work in old IEs. That's exactly the type of confirmation that I'm looking for. Another Google search of "at-rules and old explorers" led me to this page: <http://msdn.microsoft.com/en-us/library/hh781508%28v=vs.85%29.aspx> ... which says @media is supported in IE 6-10. When going to the @media detail page: <http://msdn.microsoft.com/library/ie/ms530813.aspx> ... they list "screen", "print" and "all" as supported "media types" (sMediaType). Awesome. I think that's pretty concrete evidence that this will work in the real world (I just need to avoid @media, without a media type, and IE 8). Cheers, M ______________________________________________________________________ css-discuss [css-d@lists.css-discuss.org] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ List policies -- http://css-discuss.org/policies.html Supported by evolt.org -- http://www.evolt.org/help_support_evolt/