- This topic is empty.
-
AuthorPosts
-
March 31, 2014 at 9:02 am #167230rpkParticipant
I have a subtle pattern as background image. One image for regular resolutions and one double the size for retina displays. i wanted to display the retina background image starting with a resolution of 1.5 . But no matter what i try either with 1.5 dppx or without:
body { background: image-url('ttg.png') repeat top left; @media (min-resolution: 1.5dppx), (-webkit-min-device-pixel-ratio: 1.5), (-moz-min-device-pixel-ratio: 1.5), (min-resolution: 144dpi) { background: image-url('[email protected]') repeat top left; background-size: 476px 476px; } }
Chrome is throwing a recommendation at me in the console:
Consider using ‘dppx’ units instead of ‘dpi’, as in CSS ‘dpi’ means dots-per-CSS-inch, not dots-per-physical-inch, so does not correspond to the actual ‘dpi’ of a screen. In media query expression: (-webkit-min-device-pixel-ratio: 1.5), not all, (min-resolution: 144dpi)
No matter if i leave
(min-resolution: 1.5dppx),
in or cut it out. What is the reason for that behaviour? Safari isn’t showing anything similar. :/ Best regards RalfMarch 31, 2014 at 9:14 am #167236Paulie_DMemberSafari isn’t showing anything similar.
Because Chrome is better!
March 31, 2014 at 10:00 am #167237rpkParticipanthmmm and what would be the appropriate retina media query to satisfy Chrome? I get that remark no matter if i use
(min-resolution: 1.5dppx)
or not.March 31, 2014 at 10:52 am #167240Alan CParticipantWell there is an article Here that gives the retina display media queries, maybe try one of those?
March 31, 2014 at 12:06 pm #167242rpkParticipantwell i already used more or less the same like in the article by leaving out the dppx min-resolution, only leaving the moz prefix in. but i left that out too now, just:
@media (-webkit-min-device-pixel-ratio: 1.5), (min-resolution: 144dpi)
but Chromes answer is still the same:
Consider using ‘dppx’ units instead of ‘dpi’, as in CSS ‘dpi’ means dots-per-CSS-inch, not dots-per-physical-inch, so does not correspond to the actual ‘dpi’ of a screen. In media query expression: (-webkit-min-device-pixel-ratio: 1.5), not all, (min-resolution: 144dpi)
November 3, 2014 at 12:45 pm #187595CyclodexParticipantJust for a follow up, this was a bug…
If you have dppx override, it should not show you this message anymore.
For testing: http://jsfiddle.net/gMRv9/November 14, 2014 at 4:00 am #188307rpkParticipantCool thanks a lot for the info!
February 9, 2015 at 10:05 am #195384ovilizParticipantSo it is still a bug even the latest Chrome update?
-
AuthorPosts
- The forum ‘CSS’ is closed to new topics and replies.