Skip to content

Instantly share code, notes, and snippets.

@alainmeier
Last active October 7, 2015 06:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save alainmeier/3122743 to your computer and use it in GitHub Desktop.
Save alainmeier/3122743 to your computer and use it in GitHub Desktop.
@media only screen and (min--moz-device-pixel-ratio: 1.5), /* Gecko */
only screen and (-o-min-device-pixel-ratio: 3/2), /* Opera */
only screen and (-webkit-min-device-pixel-ratio: 1.5), /* Webkit */
only screen and (min-device-pixel-ratio: 1.5), /* Webkit */
only screen and (min-resolution: 144dpi) /* W3 */
{
.button-icon {
background-image: url("path/to/image/name@2x.png");
background-size: 16px 16px;
}
}
@mm201
Copy link

mm201 commented Nov 1, 2012

Please pull from https://gist.github.com/3995490
I added media queries for other browsers to support image replacement. (I tested with IE9 and Firefox 18)
http://codepo8.github.com/prefix-the-web/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment