Sha256: d479addf4ba536f564f183557b7625d80154bdad2c67d4400a48c71370071be9

Contents?: true

Size: 1.13 KB

Versions: 217

Compression:

Stored size: 1.13 KB

Contents

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


// Responsive image
//
// Keep images from scaling beyond the width of their parents.

@mixin img-fluid() {
  // Part 1: Set a maximum relative to the parent
  max-width: 100%;
  // Part 2: Override the height to auto, otherwise images will be stretched
  // when setting a width and height attribute on the img element.
  height: auto;
}


// Retina image
//
// Short retina mixin for setting background-image and -size.

@mixin img-retina($file-1x, $file-2x, $width-1x, $height-1x) {
  background-image: url($file-1x);

  // Autoprefixer takes care of adding -webkit-min-device-pixel-ratio and -o-min-device-pixel-ratio,
  // but doesn't convert dppx=>dpi.
  // There's no such thing as unprefixed min-device-pixel-ratio since it's nonstandard.
  // Compatibility info: https://caniuse.com/#feat=css-media-resolution
  @media only screen and (min-resolution: 192dpi), // IE9-11 don't support dppx
    only screen and (min-resolution: 2dppx) { // Standardized
    background-image: url($file-2x);
    background-size: $width-1x $height-1x;
  }
  @include deprecate("`img-retina()`", "v4.3.0", "v5");
}

Version data entries

217 entries across 217 versions & 12 rubygems

Version Path
devops4lib-jekyll-theme-conference-0.0.1 _sass/bootstrap/mixins/_image.scss
jekyll-theme-conference-3.6.6 _sass/bootstrap/mixins/_image.scss
jekyll-theme-conference-3.6.5 _sass/bootstrap/mixins/_image.scss
jekyll-theme-conference-3.6.4 _sass/bootstrap/mixins/_image.scss
jekyll-theme-conference-3.6.3 _sass/bootstrap/mixins/_image.scss
jekyll-theme-conference-3.6.2 _sass/bootstrap/mixins/_image.scss
jekyll-theme-conference-3.6.1 _sass/bootstrap/mixins/_image.scss
jekyll-theme-centos-0.9.20221031122647 _sass/bootstrap/mixins/_image.scss
jekyll-theme-centos-0.9.20220805132206 _sass/bootstrap/mixins/_image.scss
jekyll-theme-conference-3.6.0 _sass/bootstrap/mixins/_image.scss
jekyll-theme-centos-0.9.20220227231551 _sass/bootstrap/mixins/_image.scss
viniBaxter-desk_front-300.0.12 lib/viniBaxter/sass/desk_front/bootstrap/mixins/_image.scss
jekyll-theme-conference-3.5.0 _sass/bootstrap/mixins/_image.scss
viniBaxter-desk_front-300.0.11 lib/viniBaxter/sass/desk_front/bootstrap/mixins/_image.scss
jekyll-theme-conference-3.4.1 _sass/bootstrap/mixins/_image.scss
jekyll-theme-centos-0.9.20220212202853 _sass/bootstrap/mixins/_image.scss
jekyll-theme-centos-0.9.20220212195701 _sass/bootstrap/mixins/_image.scss
viniBaxter-desk_front-300.0.10 lib/viniBaxter/sass/desk_front/bootstrap/mixins/_image.scss
viniBaxter-desk_front-300.0.8 lib/viniBaxter/sass/desk_front/bootstrap/mixins/_image.scss
viniBaxter-desk_front-300.0.7 lib/viniBaxter/sass/desk_front/bootstrap/mixins/_image.scss