8 flex-direction: column;
10 word-wrap: break-word;
11 background-color: $card-bg;
12 background-clip: border-box;
13 border: $card-border-width solid $card-border-color;
14 @include border-radius($card-border-radius);
21 > .list-group:first-child {
22 .list-group-item:first-child {
23 @include border-top-radius($card-border-radius);
27 > .list-group:last-child {
28 .list-group-item:last-child {
29 @include border-bottom-radius($card-border-radius);
35 // Enable `flex-grow: 1` for decks and groups so that card blocks take up
36 // as much space as possible, ensuring footers are aligned to the bottom.
38 padding: $card-spacer-x;
42 margin-bottom: $card-spacer-y;
46 margin-top: -($card-spacer-y / 2);
50 .card-text:last-child {
56 text-decoration: none;
60 margin-left: $card-spacer-x;
65 // Optional textual caps
69 padding: $card-spacer-y $card-spacer-x;
70 margin-bottom: 0; // Removes the default margin-bottom of <hN>
71 background-color: $card-cap-bg;
72 border-bottom: $card-border-width solid $card-border-color;
75 @include border-radius($card-inner-border-radius $card-inner-border-radius 0 0);
79 .list-group-item:first-child {
86 padding: $card-spacer-y $card-spacer-x;
87 background-color: $card-cap-bg;
88 border-top: $card-border-width solid $card-border-color;
91 @include border-radius(0 0 $card-inner-border-radius $card-inner-border-radius);
101 margin-right: -($card-spacer-x / 2);
102 margin-bottom: -$card-spacer-y;
103 margin-left: -($card-spacer-x / 2);
108 margin-right: -($card-spacer-x / 2);
109 margin-left: -($card-spacer-x / 2);
119 padding: $card-img-overlay-padding;
123 width: 100%; // Required because we use flexbox and this inherently applies align-self: stretch
124 @include border-radius($card-inner-border-radius);
129 width: 100%; // Required because we use flexbox and this inherently applies align-self: stretch
130 @include border-top-radius($card-inner-border-radius);
134 width: 100%; // Required because we use flexbox and this inherently applies align-self: stretch
135 @include border-bottom-radius($card-inner-border-radius);
143 flex-direction: column;
146 margin-bottom: $card-deck-margin;
149 @include media-breakpoint-up(sm) {
151 margin-right: -$card-deck-margin;
152 margin-left: -$card-deck-margin;
156 // Flexbugs #4: https://github.com/philipwalton/flexbugs#flexbug-4
158 flex-direction: column;
159 margin-right: $card-deck-margin;
160 margin-bottom: 0; // Override the default
161 margin-left: $card-deck-margin;
173 flex-direction: column;
175 // The child selector allows nested `.card` within `.card-group`
176 // to display properly.
178 margin-bottom: $card-group-margin;
181 @include media-breakpoint-up(sm) {
183 // The child selector allows nested `.card` within `.card-group`
184 // to display properly.
186 // Flexbugs #4: https://github.com/philipwalton/flexbugs#flexbug-4
195 // Handle rounded corners
196 @if $enable-rounded {
198 @include border-right-radius(0);
202 border-top-right-radius: 0;
206 border-bottom-right-radius: 0;
211 @include border-left-radius(0);
215 border-top-left-radius: 0;
219 border-bottom-left-radius: 0;
224 @include border-radius($card-border-radius);
228 @include border-top-radius($card-border-radius);
232 @include border-bottom-radius($card-border-radius);
236 &:not(:first-child):not(:last-child):not(:only-child) {
237 @include border-radius(0);
243 @include border-radius(0);
258 margin-bottom: $card-columns-margin;
261 @include media-breakpoint-up(sm) {
262 column-count: $card-columns-count;
263 column-gap: $card-columns-gap;
268 display: inline-block; // Don't let them vertically span multiple columns
269 width: 100%; // Don't let their width change
280 .card:not(:first-of-type):not(:last-of-type) {
285 .card:not(:first-of-type) {
286 .card-header:first-child {
291 .card:first-of-type {
293 border-bottom-right-radius: 0;
294 border-bottom-left-radius: 0;
298 border-top-left-radius: 0;
299 border-top-right-radius: 0;