Skip to content

Instantly share code, notes, and snippets.

@maxkarkowski
Created June 18, 2015 09:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save maxkarkowski/52ed1e3b3cd31b40dca3 to your computer and use it in GitHub Desktop.
Save maxkarkowski/52ed1e3b3cd31b40dca3 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// ----
// Sass (v3.4.13)
// Compass (v1.0.3)
// ----
$images-base-path: 'test/';
@mixin retinaBg($path) {
background-image: url($images-base-path + $path +'.png');
@media only screen and (min-device-pixel-ratio: 2),
only screen and (min-resolution: 192dpi) {
background-image: url($images-base-path + $path +'@2x.png');
}
}
.foo{
@include retinaBg('/icons/options/sms');
}
.foo {
background-image: url(test//icons/options/sms.png?1431340934);
}
@media only screen and (min-device-pixel-ratio: 2), only screen and (min-resolution: 192dpi) {
.foo {
background-image: url(test//icons/options/sms@2x.png?1431340934);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment