Sha256: 981fe7190d130c3410416f826bfff3fba01c9b6eade1ef207aa16721e2da2f35

Contents?: true

Size: 1.11 KB

Versions: 36

Compression:

Stored size: 1.11 KB

Contents

// Image Mixins
// - Responsive image
// - Retina image


// Responsive image
//
// Keep images from scaling beyond the width of their parents.
.img-responsive(@display: block) {
  display: @display;
  width: 100% \9; // Force IE10 and below to size SVG images correctly
  max-width: 100%; // Part 1: Set a maximum relative to the parent
  height: auto; // Part 2: Scale the height according to the width, otherwise you get stretching
}


// Retina image
//
// Short retina mixin for setting background-image and -size. Note that the
// spelling of `min--moz-device-pixel-ratio` is intentional.
.img-retina(@file-1x; @file-2x; @width-1x; @height-1x) {
  background-image: url("@{file-1x}");

  @media
  only screen and (-webkit-min-device-pixel-ratio: 2),
  only screen and (   min--moz-device-pixel-ratio: 2),
  only screen and (     -o-min-device-pixel-ratio: 2/1),
  only screen and (        min-device-pixel-ratio: 2),
  only screen and (                min-resolution: 192dpi),
  only screen and (                min-resolution: 2dppx) {
    background-image: url("@{file-2x}");
    background-size: @width-1x @height-1x;
  }
}

Version data entries

36 entries across 36 versions & 8 rubygems

Version Path
kms-0.9.0 vendor/assets/bower_components/bootstrap/less/mixins/image.less
i-cms-0.1.0 app/assets/stylesheets/integrator/bootstrap/mixins/image.less
kms-0.8.0 vendor/assets/bower_components/bootstrap/less/mixins/image.less
kms-0.7.0 vendor/assets/bower_components/bootstrap/less/mixins/image.less
kms-0.6.0 vendor/assets/bower_components/bootstrap/less/mixins/image.less
kms-0.5.0 vendor/assets/bower_components/bootstrap/less/mixins/image.less
kms-0.4.2 vendor/assets/bower_components/bootstrap/less/mixins/image.less
agile-proxy-0.1.24 assets/ui/bower_components/bootstrap/less/mixins/image.less
agile-proxy-0.1.23 assets/ui/bower_components/bootstrap/less/mixins/image.less
agile-proxy-0.1.22 assets/ui/bower_components/bootstrap/less/mixins/image.less
agile-proxy-0.1.21 assets/ui/bower_components/bootstrap/less/mixins/image.less
agile-proxy-0.1.20 assets/ui/bower_components/bootstrap/less/mixins/image.less
agile-proxy-0.1.19 assets/ui/bower_components/bootstrap/less/mixins/image.less
agile-proxy-0.1.18 assets/ui/bower_components/bootstrap/less/mixins/image.less
agile-proxy-0.1.13 assets/ui/bower_components/bootstrap/less/mixins/image.less
agile-proxy-0.1.12 assets/ui/bower_components/bootstrap/less/mixins/image.less
agile-proxy-0.1.11 assets/ui/bower_components/bootstrap/less/mixins/image.less
agile-proxy-0.1.10 assets/ui/bower_components/bootstrap/less/mixins/image.less
agile-proxy-0.1.9 assets/ui/bower_components/bootstrap/less/mixins/image.less
agile-proxy-0.1.8 assets/ui/bower_components/bootstrap/less/mixins/image.less