Le 16 mars 2013 à 14:08, Micky Hulse <mickyhulse.li...@gmail.com> a écrit :

> On Fri, Mar 15, 2013 at 11:38 AM, Micky Hulse
> <mickyhulse.li...@gmail.com> wrote:
>> Oh, that's good to know. I did not realize that this was the case. I
>> probably read some misinformation somewhere (or I did not fully
>> understand one of the articles I read) saying that @media print {} was
>> IE9+ thing.
> 
> Ah, I think this is the site where I read that "@media print` was an IE9+ 
> thing:
> 
> "CSS Print Media Query"
> <http://www.joshuawinn.com/css-print-media-query/>

Hmm, I think that is not correct, based on experience. But it is entirely 
possible that IE8 and older have problems when the @media print {} block 
contains elements that it doesn't understand, such as the new HTML5 elements.

Make sure you use the html5shiv-printshiv (or Modernizr equivalent)
https://github.com/aFarkas/html5shiv/tree/master/dist

Also, it is possible that IE 8 also has problems when there are selectors it 
doesn't understand inside the @media print {} block (e.g. ::before, or 
:nth-child(), etc). I seem to remember some forum threads on Alsacecreations 
about this. But memory is fuzzy atm.

------------- 
Micky Hulse in an earlier message :

> @media screen, all and (min-width: 300px) {
>       div {
>               background: blue;
>       }
> }
> 
> Based on my tests, IE6 and IE7 actually read the contents of the
> @media! Unfortunately, surprisingly, STRANGELY, IE8 doesn't fall in
> line with it's predecessors. Unbelievable. Sad too.


FWIW, Firefox 3.0 / Camino 2.0 would also ignore the whole block. That is 
perhaps a bit of an ambiguity in CSS 2.1 I think.
As far as I can see, IE 8, Firefox 3.0 will happily parse (and apply) this:
@media screen, foo {}

CSS 2.1 only talks about 'media types' (identifiers), and mentions as an 
example '3D' (which should be ignored). There is no mention of constructs of 
the type 'all and (something)'  – the Fx3.0 console flags the whole @media 
block as invalid. I tend to think IE 8 and Fx 3 are right as 'all and 
(something)' isn't an identifier, or is considered a malformed identifier.

Philippe
--
Philippe Wittenbergh
http://l-c-n.com




______________________________________________________________________
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/

Reply via email to