Retina media queries

67 views
Skip to first unread message

grappler

unread,
Jan 5, 2013, 10:38:37 AM1/5/13
to css-...@googlegroups.com
Hello, I ran this css through CSS Lint and I am getting Parsing Errors and I don't see how come.
 
/* Retina (HiDPI) Display
    http://www.quirksmode.org/blog/archives/2012/06/devicepixelrati.html
-------------------------------------------------------------- */
@media 
    only screen and (-moz-min-device-pixel-ratio:1.5), 
    only screen and (-o-min-device-pixel-ratio:3/2), 
    only screen and (-webkit-min-device-pixel-ratio:1.5), 
    only screen and (min-device-pixel-ratio:1.5) {
    
    body {
        background: green;
    }
}

Is there a problem with the css? 

Jonathan Klein

unread,
Jan 6, 2013, 9:50:22 AM1/6/13
to css-...@googlegroups.com
It looks like CSS Lint is unhappy with the Opera specific fractional value (-o-min-device-pixel-ratio:3/2).  Your options are either to remove that declaration if you need CSS Lint to pass, or just ignore it if you don't.  This is valid CSS, so it's probably a bug in the parser (although that Opera syntax is ludicrous, and hopefully it will soon be obsolete, so it might not be worth fixing).  You can open an issue on github for this as well.

Nicholas Zakas

unread,
Jan 7, 2013, 1:10:03 PM1/7/13
to css-...@googlegroups.com
IIRC, there is already a bug for this.

-N
--

______________________________
Nicholas C. Zakas
@slicknet

Author, Professional JavaScript for Web Developers
Buy it at Amazon.com: http://www.amazon.com/Professional-JavaScript-Developers-Nicholas-Zakas/dp/1118026691/ref=sr_1_3
Reply all
Reply to author
Forward
0 new messages