This repository has been archived on 2022-02-28. You can view files and clone it, but cannot push or open issues or pull requests.
frontend-styles/src/scss/helpers/_image.scss

14 lines
547 B
SCSS

// Image Mixins
// Responsive image
//
// Keep images from scaling beyond the width of their parents.
// Solution provided by Twitter Bootstrap https://github.com/twbs/bootstrap/commit/88bf5af896a872d65752956e85adb66a9192e697#diff-74a54d296e5e8ef9f54d15fe3330778f63536c312545c97c169b4fd213fe93a5
@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;
}