mirror of
https://github.com/scratchfoundation/scratchx.git
synced 2024-11-29 02:55:53 -05:00
25 lines
835 B
SCSS
25 lines
835 B
SCSS
@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;
|
|
}
|
|
}
|