Skip to content

Instantly share code, notes, and snippets.

@pfulton
Created September 12, 2012 20:59
Show Gist options
  • Save pfulton/3709892 to your computer and use it in GitHub Desktop.
Save pfulton/3709892 to your computer and use it in GitHub Desktop.
data URI downloading
.box {
background: big-ass-data-uri-string-for-non-retina-hd-image;
}
@media (-webkit-min-device-pixel-ratio: 1.5), (-o-min-device-pixel-ratio: 3 / 2), (min-device-pixel-ratio: 1.5) {
.box {
background: big-ass-data-uri-string-for-retina-hd-image;
}
}
/* does the browser load both images because they're actually encoded content vs. images? Does this even matter? The device should display the proper image based on the media query, right? */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment