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 color: $card-cap-color;
72 background-color: $card-cap-bg;
73 border-bottom: $card-border-width solid $card-border-color;
76 @include border-radius($card-inner-border-radius $card-inner-border-radius 0 0);
80 .list-group-item:first-child {
87 padding: $card-spacer-y $card-spacer-x;
88 background-color: $card-cap-bg;
89 border-top: $card-border-width solid $card-border-color;
92 @include border-radius(0 0 $card-inner-border-radius $card-inner-border-radius);
102 margin-right: -($card-spacer-x / 2);
103 margin-bottom: -$card-spacer-y;
104 margin-left: -($card-spacer-x / 2);
109 margin-right: -($card-spacer-x / 2);
110 margin-left: -($card-spacer-x / 2);
120 padding: $card-img-overlay-padding;
124 width: 100%; // Required because we use flexbox and this inherently applies align-self: stretch
125 @include border-radius($card-inner-border-radius);
130 width: 100%; // Required because we use flexbox and this inherently applies align-self: stretch
131 @include border-top-radius($card-inner-border-radius);
135 width: 100%; // Required because we use flexbox and this inherently applies align-self: stretch
136 @include border-bottom-radius($card-inner-border-radius);
144 flex-direction: column;
147 margin-bottom: $card-deck-margin;
150 @include media-breakpoint-up(sm) {
152 margin-right: -$card-deck-margin;
153 margin-left: -$card-deck-margin;
157 // Flexbugs #4: https://github.com/philipwalton/flexbugs#flexbug-4
159 flex-direction: column;
160 margin-right: $card-deck-margin;
161 margin-bottom: 0; // Override the default
162 margin-left: $card-deck-margin;
174 flex-direction: column;
176 // The child selector allows nested `.card` within `.card-group`
177 // to display properly.
179 margin-bottom: $card-group-margin;
182 @include media-breakpoint-up(sm) {
184 // The child selector allows nested `.card` within `.card-group`
185 // to display properly.
187 // Flexbugs #4: https://github.com/philipwalton/flexbugs#flexbug-4
196 // Handle rounded corners
197 @if $enable-rounded {
199 @include border-right-radius(0);
203 border-top-right-radius: 0;
207 border-bottom-right-radius: 0;
212 @include border-left-radius(0);
216 border-top-left-radius: 0;
220 border-bottom-left-radius: 0;
225 @include border-radius($card-border-radius);
229 @include border-top-radius($card-border-radius);
233 @include border-bottom-radius($card-border-radius);
237 &:not(:first-child):not(:last-child):not(:only-child) {
238 @include border-radius(0);
244 @include border-radius(0);
259 margin-bottom: $card-columns-margin;
262 @include media-breakpoint-up(sm) {
263 column-count: $card-columns-count;
264 column-gap: $card-columns-gap;
269 display: inline-block; // Don't let them vertically span multiple columns
270 width: 100%; // Don't let their width change
284 &:not(:first-of-type) {
285 .card-header:first-child {
289 &:not(:last-of-type) {
297 border-bottom-right-radius: 0;
298 border-bottom-left-radius: 0;
302 border-top-left-radius: 0;
303 border-top-right-radius: 0;
307 margin-bottom: -$card-border-width;