@mixin retina { @media screen and (-webkit-min-device-pixel-ratio: 1.5), screen and (-moz-min-device-pixel-ratio: 1.5), screen and (-o-min-device-pixel-ratio: 3 / 2), screen and (min-device-pixel-ratio: 1.5), screen and (min-resolution: 1.5dppx) { @content; } } // Usage .element { @include retina { background-image: url(../img/background@2x.png); } }