mirror of
https://github.com/twbs/bootstrap.git
synced 2025-02-20 17:54:23 +01:00
fixes #9445: make img responsive mixin use display block, but provide option to pass custom value to it
This commit is contained in:
parent
0456e5e4b3
commit
622fe05ff4
10
dist/css/bootstrap.css
vendored
10
dist/css/bootstrap.css
vendored
@ -344,12 +344,6 @@ img {
|
|||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
|
|
||||||
.img-responsive {
|
|
||||||
display: inline-block;
|
|
||||||
height: auto;
|
|
||||||
max-width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.img-rounded {
|
.img-rounded {
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
}
|
}
|
||||||
@ -4567,7 +4561,7 @@ button.close {
|
|||||||
|
|
||||||
.thumbnail > img,
|
.thumbnail > img,
|
||||||
.img-thumbnail {
|
.img-thumbnail {
|
||||||
display: inline-block;
|
display: block;
|
||||||
height: auto;
|
height: auto;
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
}
|
}
|
||||||
@ -4872,7 +4866,7 @@ a.list-group-item.active > .badge,
|
|||||||
|
|
||||||
.carousel-inner > .item > img,
|
.carousel-inner > .item > img,
|
||||||
.carousel-inner > .item > a > img {
|
.carousel-inner > .item > a > img {
|
||||||
display: inline-block;
|
display: block;
|
||||||
height: auto;
|
height: auto;
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
|
2
dist/css/bootstrap.min.css
vendored
2
dist/css/bootstrap.min.css
vendored
File diff suppressed because one or more lines are too long
@ -73,8 +73,8 @@ img {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Responsive images (ensure images don't scale beyond their parents)
|
// Responsive images (ensure images don't scale beyond their parents)
|
||||||
.img-responsive {
|
.img-responsive(@display: block;) {
|
||||||
display: inline-block;
|
display: @display;
|
||||||
max-width: 100%; // Part 1: Set a maximum relative to the parent
|
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
|
height: auto; // Part 2: Scale the height according to the width, otherwise you get stretching
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user