1 | // Responsive images (ensure images don't scale beyond their parents)
|
2 | //
|
3 | // This is purposefully opt-in via an explicit class rather than being the default for all `<img>`s.
|
4 | // We previously tried the "images are responsive by default" approach in Bootstrap v2,
|
5 | // and abandoned it in Bootstrap v3 because it breaks lots of third-party widgets (including Google Maps)
|
6 | // which weren't expecting the images within themselves to be involuntarily resized.
|
7 | // See also https://github.com/twbs/bootstrap/issues/18178
|
8 | .img-fluid {
|
9 | @include img-fluid;
|
10 | }
|
11 |
|
12 |
|
13 | // Image thumbnails
|
14 | .img-thumbnail {
|
15 | padding: $thumbnail-padding;
|
16 | background-color: $thumbnail-bg;
|
17 | border: $thumbnail-border-width solid $thumbnail-border-color;
|
18 | @include border-radius($thumbnail-border-radius);
|
19 | @include transition($thumbnail-transition);
|
20 | @include box-shadow($thumbnail-box-shadow);
|
21 |
|
22 | // Keep them at most 100% wide
|
23 | @include img-fluid;
|
24 | }
|
25 |
|
26 | //
|
27 | // Figures
|
28 | //
|
29 |
|
30 | .figure {
|
31 | // Ensures the caption's text aligns with the image.
|
32 | display: inline-block;
|
33 | }
|
34 |
|
35 | .figure-img {
|
36 | margin-bottom: ($spacer-y / 2);
|
37 | line-height: 1;
|
38 | }
|
39 |
|
40 | .figure-caption {
|
41 | font-size: $figure-caption-font-size;
|
42 | color: $figure-caption-color;
|
43 | }
|