0
0
mirror of https://github.com/twbs/bootstrap.git synced 2024-11-29 11:24:18 +01:00

Merge pull request #18469 from twbs/card-deck-margin

Introduce $card-deck-margin variable
/fyi @mdo; happy to tweak the var names if desired
This commit is contained in:
Chris Rebert 2015-12-16 22:16:36 -08:00
commit 92338da1f3
2 changed files with 10 additions and 7 deletions

View File

@ -180,22 +180,23 @@
.card-deck {
display: flex;
flex-flow: row wrap;
margin-right: -.625rem;
margin-left: -.625rem;
margin-right: -$card-deck-margin;
margin-left: -$card-deck-margin;
.card {
flex: 1 0 0;
margin-right: .625rem;
margin-left: .625rem;
margin-right: $card-deck-margin;
margin-left: $card-deck-margin;
}
}
}
} @else {
@include media-breakpoint-up(sm) {
$space-between-cards: (2 * $card-deck-margin);
.card-deck {
display: table;
table-layout: fixed;
border-spacing: 1.25rem 0;
border-spacing: $space-between-cards 0;
.card {
display: table-cell;
@ -204,8 +205,8 @@
}
}
.card-deck-wrapper {
margin-right: -1.25rem;
margin-left: -1.25rem;
margin-right: (-$space-between-cards);
margin-left: (-$space-between-cards);
}
}
}

View File

@ -486,6 +486,8 @@ $card-bg: #fff !default;
$card-link-hover-color: #fff !default;
$card-deck-margin: .625rem !default;
// Tooltips