diff --git a/docs/components/card.md b/docs/components/card.md index dc8a921b85..74debae448 100644 --- a/docs/components/card.md +++ b/docs/components/card.md @@ -359,7 +359,7 @@ Turn an image into a card background and overlay your card's text. Depending on
{% endexample %} @@ -644,7 +644,7 @@ Cards can be organized into [Masonry](http://masonry.desandro.com)-like columns {% example html %}This is a longer card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.
@@ -661,7 +661,7 @@ Cards can be organized into [Masonry](http://masonry.desandro.com)-like columnsThis card has supporting text below as a natural lead-in to additional content.
@@ -686,7 +686,7 @@ Cards can be organized into [Masonry](http://masonry.desandro.com)-like columnsdiff --git a/scss/_card.scss b/scss/_card.scss index 9fe70e8cf6..99f7c21958 100644 --- a/scss/_card.scss +++ b/scss/_card.scss @@ -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); }