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