1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-09-01 01:21:49 +02:00

Card image fixes (#22288)

* fix image stretching due to flexbox
* fix broke text-muted on dark bg
* no img-fluid needed
This commit is contained in:
Mark Otto
2017-03-27 22:52:24 -07:00
committed by GitHub
parent 24924c23b2
commit fe3acc097a
2 changed files with 11 additions and 9 deletions

View File

@@ -158,10 +158,6 @@
}
// Card image
.card-img {
// margin: -1.325rem;
@include border-radius($card-border-radius-inner);
}
.card-img-overlay {
position: absolute;
top: 0;
@@ -171,13 +167,19 @@
padding: $card-img-overlay-padding;
}
.card-img {
width: 100%; // Required because we use flexbox and this inherently applies align-self: stretch
@include border-radius($card-border-radius-inner);
}
// Card image caps
.card-img-top {
width: 100%; // Required because we use flexbox and this inherently applies align-self: stretch
@include border-top-radius($card-border-radius-inner);
}
.card-img-bottom {
width: 100%; // Required because we use flexbox and this inherently applies align-self: stretch
@include border-bottom-radius($card-border-radius-inner);
}