Sha256: 4262a408364f141f9efae8dfa93b8774550c68f0d1f2268afcffe4498a2eb755

Contents?: true

Size: 801 Bytes

Versions: 11

Compression:

Stored size: 801 Bytes

Contents

@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;

  }
}

Version data entries

11 entries across 11 versions & 2 rubygems

Version Path
bourbon-compass-3.1.6 stylesheets/bourbon/addons/_retina-image.scss
bourbon-3.1.6 app/assets/stylesheets/addons/_retina-image.scss
bourbon-compass-3.1.5 stylesheets/bourbon/addons/_retina-image.scss
bourbon-3.1.5 app/assets/stylesheets/addons/_retina-image.scss
bourbon-compass-3.1.4 stylesheets/bourbon/addons/_retina-image.scss
bourbon-3.1.4 app/assets/stylesheets/addons/_retina-image.scss
bourbon-compass-3.1.3 stylesheets/bourbon/addons/_retina-image.scss
bourbon-3.1.3 app/assets/stylesheets/addons/_retina-image.scss
bourbon-3.1.2.1 app/assets/stylesheets/addons/_retina-image.scss
bourbon-compass-3.1.1 stylesheets/bourbon/addons/_retina-image.scss
bourbon-3.1.1 app/assets/stylesheets/addons/_retina-image.scss