Sha256: 6be9e7f681730eb7eb2323286370d669d5f55aeb93df50b149dda46a288230d3

Contents?: true

Size: 845 Bytes

Versions: 41

Compression:

Stored size: 845 Bytes

Contents

@mixin retina-image($filename, $background-size, $extension: png, $retina-filename: null, $retina-suffix: _2x, $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}#{$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;

  }
}

Version data entries

41 entries across 33 versions & 6 rubygems

Version Path
bourbon-compass-4.0.1 stylesheets/bourbon/addons/_retina-image.scss
bourbon-compass-4.0.0 stylesheets/bourbon/addons/_retina-image.scss
bourbon-compass-3.2.1 stylesheets/bourbon/addons/_retina-image.scss
bourbon-compass-3.2.0 stylesheets/bourbon/addons/_retina-image.scss
bourbon-4.0.1 dist/addons/_retina-image.scss
bourbon-4.0.1 app/assets/stylesheets/addons/_retina-image.scss
bourbon-3.2.1 app/assets/stylesheets/addons/_retina-image.scss
bourbon-3.2.1 dist/addons/_retina-image.scss
bourbon-4.0.0 app/assets/stylesheets/addons/_retina-image.scss
bourbon-4.0.0 dist/addons/_retina-image.scss
bourbon-3.2.0 app/assets/stylesheets/addons/_retina-image.scss
bourbon-3.2.0 dist/addons/_retina-image.scss
bourbon-4.0.0.rc2 dist/addons/_retina-image.scss
bourbon-4.0.0.rc2 app/assets/stylesheets/addons/_retina-image.scss
bourbon-4.0.0.rc1 dist/addons/_retina-image.scss
bourbon-4.0.0.rc1 app/assets/stylesheets/addons/_retina-image.scss
bourbon-3.2.0.beta.2 dist/addons/_retina-image.scss
bourbon-3.2.0.beta.2 app/assets/stylesheets/addons/_retina-image.scss
bourbon-compass-3.2.0.beta.1.a stylesheets/bourbon/addons/_retina-image.scss
bourbon-3.2.0.beta.1 dist/addons/_retina-image.scss