You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
835 B
26 lines
835 B
8 years ago
|
@mixin retina-image($filename, $background-size, $extension: png, $retina-filename: null, $retina-suffix: _2x, $asset-pipeline: $asset-pipeline) {
|
||
|
@if $asset-pipeline {
|
||
|
background-image: image-url("#{$filename}.#{$extension}");
|
||
|
} @else {
|
||
|
background-image: url("#{$filename}.#{$extension}");
|
||
|
}
|
||
|
|
||
|
@include hidpi {
|
||
|
@if $asset-pipeline {
|
||
|
@if $retina-filename {
|
||
|
background-image: image-url("#{$retina-filename}.#{$extension}");
|
||
|
} @else {
|
||
|
background-image: image-url("#{$filename}#{$retina-suffix}.#{$extension}");
|
||
|
}
|
||
|
} @else {
|
||
|
@if $retina-filename {
|
||
|
background-image: url("#{$retina-filename}.#{$extension}");
|
||
|
} @else {
|
||
|
background-image: url("#{$filename}#{$retina-suffix}.#{$extension}");
|
||
|
}
|
||
|
}
|
||
|
|
||
|
background-size: $background-size;
|
||
|
}
|
||
|
}
|