_retina-image.scss (835B)
1 @mixin retina-image($filename, $background-size, $extension: png, $retina-filename: null, $retina-suffix: _2x, $asset-pipeline: $asset-pipeline) { 2 @if $asset-pipeline { 3 background-image: image-url("#{$filename}.#{$extension}"); 4 } @else { 5 background-image: url("#{$filename}.#{$extension}"); 6 } 7 8 @include hidpi { 9 @if $asset-pipeline { 10 @if $retina-filename { 11 background-image: image-url("#{$retina-filename}.#{$extension}"); 12 } @else { 13 background-image: image-url("#{$filename}#{$retina-suffix}.#{$extension}"); 14 } 15 } @else { 16 @if $retina-filename { 17 background-image: url("#{$retina-filename}.#{$extension}"); 18 } @else { 19 background-image: url("#{$filename}#{$retina-suffix}.#{$extension}"); 20 } 21 } 22 23 background-size: $background-size; 24 } 25 }