mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-31 00:59:51 +02:00
Revert "Images are responsive by default"
This reverts commitd29f851e82
. Making <img>s responsive by-default without opt-in can severely break third-party widgets such as Google Maps. This was an acknowledged problem in Bootstrap v2 (see https://github.com/twbs/bootstrap/issues/1506 ) and was fixed in v3 by requiring the .img-responsive class for explicit opt-in (see09cdee2f03
). The situation hasn't really changed since then. The responsive-by-default approach hasn't become any more suitable in the intervening time. So let's avoid having this regress in v4. :-)
This commit is contained in:
@@ -1,3 +1,19 @@
|
||||
// Image Mixins
|
||||
// - Responsive image
|
||||
// - Retina image
|
||||
|
||||
|
||||
// Responsive image
|
||||
//
|
||||
// Keep images from scaling beyond the width of their parents.
|
||||
|
||||
@mixin img-responsive($display: block) {
|
||||
display: $display;
|
||||
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.
|
||||
|
Reference in New Issue
Block a user