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.
32 lines
801 B
32 lines
801 B
@mixin retina-image($filename, $background-size, $extension: png, $retina-filename: null, $asset-pipeline: false) {
|
|
@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 + "@2x" + "." + $extension);
|
|
}
|
|
}
|
|
|
|
@else {
|
|
@if $retina-filename {
|
|
background-image: url($retina-filename + "." + $extension);
|
|
}
|
|
@else {
|
|
background-image: url($filename + "@2x" + "." + $extension);
|
|
}
|
|
}
|
|
|
|
background-size: $background-size;
|
|
|
|
}
|
|
}
|
|
|